logoalt Hacker News

BenjiWiebeyesterday at 11:06 PM1 replyview on HN

No. The OS's software doesn't individually read each instruction and decide what to do with it.

It passes it off to the hardware (CPU) which runs the instructions.


Replies

lolsowrongtoday at 12:11 AM

Most of the time. But sometimes, no. See ATL thunk emulation (last I checked, still alive in the windows kernel) and ntvdm handling of the BOP pseudoinstruction.

See also: Jazelle DBX.

Hell, on modern x86 processors, many “native” instructions are actually a series of micro-ops for a mostly undocumented and mostly poorly understood microcode architecture that differs from the natively documented instruction set.

It’s turtles all the way down.

show 2 replies