ISA & Assembly

What instructions does the RISC-V M extension add to the base integer instruction set?

  1. AFloating-point arithmetic
  2. BAtomic instructions
  3. CInteger multiplication and division
Show answer and explanation

Answer: C. Integer multiplication and division

RISC-V is a modular ISA that combines a small base integer set (RV32I or RV64I) with whatever extensions are needed. The M extension adds multiply and divide such as mul, div and rem; A adds atomic instructions; F and D add single- and double-precision floating point; and C adds 16-bit compressed instructions. A tiny microcontroller can implement only the base set while a general-purpose CPU includes many extensions.

  • A. Floating point is the F and D extensions.
  • B. Atomic instructions are the A extension.
  • C. Correct. M stands for multiply.
Practice this topic Back to topic

More ISA & Assembly questions

  1. What is the main purpose of the RISC-V C extension (compressed instructions)?
  2. When C's "a * b" (multiplying two ints) is compiled for an RV32I CPU without the M extension, what generally happens?
  3. 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)?
  4. On 64-bit RV64I, how does lw place the 32-bit value it loads into a 64-bit register?
  5. Which correctly describes an ABI (application binary interface)?