Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe because if the code wants to call the invalid opcode interrupt handler (INT6), it needs extra code to populate the flags and registers expected by that handler, whereas actually triggering an invalid opcode exception will get all those parameters populated automatically.
 help



And this is code that will (hopefully) almost never run, so you don't want it to take up much space in you your program, and especially cache lines.

It doesn't have to be the invalid opcode handler that you call. Prior to SYSCALL they picked one to be the system call handler. Windows 95 used illegal instructions because it was benchmarked to be the fastest fault.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: