Machine-translated by Google. Questions are authored in English.
Top

Discussion

A register addressing mode is cheaper than a memory addressing mode because

  • A.the compiler can allocate an unlimited number of registers
  • B.memory operands cannot be used by arithmetic instructions
  • C.no extra instruction word or memory access is required
  • D.registers are physically larger than memory locations

Answer: C

The operand is named by a few bits inside the instruction itself. This is the whole reason register allocation matters so much to the quality of generated code. A value spilled to memory costs a load on every use of it.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.