RISC-V ISA Explorer · Single-Letter Extensions
M: Integer Multiply/Divide
Ratified 2019-12 · version 2.0.0
Integer multiply and divide instructions, kept out of the base so minimal cores can leave them out.
Typical use: Hardware multiplication and division
Open M in the explorerDependencies
Requires
Instructions (13)
| Mnemonic | Name | Encoding | Match | Mask |
|---|---|---|---|---|
DIV | Signed division | 0000001----------100-----0110011 | 0x2004033 | 0xfe00707f |
DIVU | Unsigned division | 0000001----------101-----0110011 | 0x2005033 | 0xfe00707f |
DIVUW | Unsigned 32-bit division | 0000001----------101-----0111011 | 0x200503b | 0xfe00707f |
DIVW | Signed 32-bit division | 0000001----------100-----0111011 | 0x200403b | 0xfe00707f |
MUL | Signed multiply | 0000001----------000-----0110011 | 0x2000033 | 0xfe00707f |
MULH | Signed multiply high | 0000001----------001-----0110011 | 0x2001033 | 0xfe00707f |
MULHSU | Signed/unsigned multiply high | 0000001----------010-----0110011 | 0x2002033 | 0xfe00707f |
MULHU | Unsigned multiply high | 0000001----------011-----0110011 | 0x2003033 | 0xfe00707f |
MULW | Signed 32-bit multiply | 0000001----------000-----0111011 | 0x200003b | 0xfe00707f |
REM | Signed remainder | 0000001----------110-----0110011 | 0x2006033 | 0xfe00707f |
REMU | Unsigned remainder | 0000001----------111-----0110011 | 0x2007033 | 0xfe00707f |
REMUW | Unsigned 32-bit remainder | 0000001----------111-----0111011 | 0x200703b | 0xfe00707f |
REMW | Signed 32-bit remainder | 0000001----------110-----0111011 | 0x200603b | 0xfe00707f |