ISA & Assembly

Which statement is correct about designs like x86, where an arithmetic instruction such as "add eax, [rbx]" can use a memory value directly?

  1. AFewer instructions are needed, but one instruction includes both a memory read and an operation
  2. BIt is called a load-store architecture
  3. COperations on memory values always take the same time as register-to-register ones
Show answer and explanation

Answer: A. Fewer instructions are needed, but one instruction includes both a memory read and an operation

x86 can "load from memory and add" in one instruction, whereas RISC-V needs two, lw and add. Instruction counts and code tend to be smaller, but the amount of work per instruction varies widely, which makes pipelining harder. So today's x86 CPUs internally split such instructions into simple operations (micro-operations), such as a load and an add, and execute those.

  • A. Correct. This is a CISC characteristic.
  • B. Load-store designs separate memory access from arithmetic.
  • C. The memory read adds time.
Practice this topic Back to topic

More ISA & Assembly questions

  1. How do today's high-performance x86 CPUs execute complex instructions internally?
  2. What instructions does the RISC-V M extension add to the base integer instruction set?
  3. What is the main purpose of the RISC-V C extension (compressed instructions)?
  4. When C's "a * b" (multiplying two ints) is compiled for an RV32I CPU without the M extension, what generally happens?
  5. What is true of the branch delay slot found in older ISAs such as MIPS (the rule that the one instruction right after a branch always executes, taken or not)?