ISA & Assembly

Which statement about instruction length in the RISC-V base ISA and in x86 is correct?

  1. ABoth use a fixed 32-bit length
  2. BRISC-V is variable-length and x86 is a fixed 32 bits
  3. CRISC-V base instructions are a fixed 32 bits; x86 instructions vary from 1 to 15 bytes
Show answer and explanation

Answer: C. RISC-V base instructions are a fixed 32 bits; x86 instructions vary from 1 to 15 bytes

All RISC-V base instructions are 32 bits, so instruction boundaries are obvious (the compressed C extension mixes in 16-bit instructions). x86 ranges from 1-byte instructions up to 15 bytes including prefixes and immediates, and the start of the next instruction is unknown until the current one is decoded. As a result, decoding several x86 instructions at once requires complex circuitry.

  • A. x86 is not fixed-length.
  • B. It is the other way around.
  • C. Correct. x86 lengths vary because of decades of extensions.