6 ms·
> The program machine code can be scanned when loaded to look for specific assembly opcodes to determine the required capability of the CPU to execute it on. T
by jlebar 6y ago
> The program machine code can be scanned when loaded to look for specific assembly opcodes to determine the required capability of the CPU to execute it on.
That works as a heuristic, but it's not perfect, since JITs and self-modifying code are a thing.
I expect the chip will raise a fault and the OS will move the process.
- aarongolliver 6y agoThis is one of the things we tried when I worked (2011-12) at Intel on QuickIA [0] (dual socket, Atom on one side Xeon on the other). One of my first projects was to write a vectorized matrix multiplication that could only run on the Xeon, so we could demo the fault-to-big-core behavior. [0] https://www.neotextus.net/hpca12.pdf https://www.neotextus.net/hpca12.pdf (I think the "3.2 QuickIA Software Support" section is interesting, if nearly a decade old by now)
- ww520 6y agoThat's true. The code could be modified on the fly after the scanning so it's good to have a last ditch illegal-opcode exception and let the OS catch the exception to migrate the process.