3 ms·
You only have to do enough to figure out instruction sizes from each byte, not the full decode. RISC-V C and Arm Thumb have to to the same thing, albeit on 16-
by monocasa 7y ago
You only have to do enough to figure out instruction sizes from each byte, not the full decode.
RISC-V C and Arm Thumb have to to the same thing, albeit on 16-bit boundaries rather than byte boundaries.
- cesarb 7y agoAt least for RISC-V (I haven't looked at Thumb2), the decoder only has to look at the first byte of any instruction (RISC-V instructions are always little-endian) to know how long the instruction is. For x86, it's much more complicated; the decoder has to read several bytes to find out the length of each instruction, and some of these bytes might or might not be present depending on other preceding bytes.