← Back to context

Comment by omoikane

14 hours ago

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.

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.