2 ms·
True. But even decoding a variable length instruction set with just two lengths is far easier than decoding x86. With T32 you just look at bits 15-13. If they
by phire 6y ago
True. But even decoding a variable length instruction set with just two lengths is far easier than decoding x86.
With T32 you just look at bits 15-13. If they are 111, it's a 32bit instruction. If they are anything else, it's a 16 bit instruction.
x86 is somewhat insane.
Instructions can be any length from 1 to 15 bytes, and thanks to prefix bytes, the bits that specify the length can be found at any byte offset and might be spread over multiple bytes and interact with each other.
Even for 15 byte instructions, the 15th byte can tell the difference between "this is a valid 15 byte instruction" or "this instruction is actually 16 bytes long and therefore invalid"