Webcentive RISC-V Reference

RISC-V A to Z: M

Instructions starting with M (54)

MnemonicNameExtension
maxMaximumZbb
maxuUnsigned maximumZbb
minMinimumZbb
minuUnsigned minimumZbb
mnretMachine mode resume from the RNMI or Double Trap handlerSmrnmi
mop.r.0May-be-operation 0 (1 source register)Zimop
mop.r.1May-be-operation 1 (1 source register)Zimop
mop.r.2May-be-operation 2 (1 source register)Zimop
mop.r.3May-be-operation 3 (1 source register)Zimop
mop.r.4May-be-operation 4 (1 source register)Zimop
mop.r.5May-be-operation 5 (1 source register)Zimop
mop.r.6May-be-operation 6 (1 source register)Zimop
mop.r.7May-be-operation 7 (1 source register)Zimop
mop.r.8May-be-operation 8 (1 source register)Zimop
mop.r.9May-be-operation 9 (1 source register)Zimop
mop.r.10May-be-operation 10 (1 source register)Zimop
mop.r.11May-be-operation 11 (1 source register)Zimop
mop.r.12May-be-operation 12 (1 source register)Zimop
mop.r.13May-be-operation 13 (1 source register)Zimop
mop.r.14May-be-operation 14 (1 source register)Zimop
mop.r.15May-be-operation 15 (1 source register)Zimop
mop.r.16May-be-operation 16 (1 source register)Zimop
mop.r.17May-be-operation 17 (1 source register)Zimop
mop.r.18May-be-operation 18 (1 source register)Zimop
mop.r.19May-be-operation 19 (1 source register)Zimop
mop.r.20May-be-operation 20 (1 source register)Zimop
mop.r.21May-be-operation 21 (1 source register)Zimop
mop.r.22May-be-operation 22 (1 source register)Zimop
mop.r.23May-be-operation 23 (1 source register)Zimop
mop.r.24May-be-operation 24 (1 source register)Zimop
mop.r.25May-be-operation 25 (1 source register)Zimop
mop.r.26May-be-operation 26 (1 source register)Zimop
mop.r.27May-be-operation 27 (1 source register)Zimop
mop.r.28May-be-operation 28 (1 source register)Zimop
mop.r.29May-be-operation 29 (1 source register)Zimop
mop.r.30May-be-operation 30 (1 source register)Zimop
mop.r.31May-be-operation 31 (1 source register)Zimop
mop.r.NZimop
mop.rr.0May-be-operation 0 (2 source registers)Zimop
mop.rr.1May-be-operation 1 (2 source registers)Zimop
mop.rr.2May-be-operation 2 (2 source registers)Zimop
mop.rr.3May-be-operation 3 (2 source registers)Zimop
mop.rr.4May-be-operation 4 (2 source registers)Zimop
mop.rr.5May-be-operation 5 (2 source registers)Zimop
mop.rr.6May-be-operation 6 (2 source registers)Zimop
mop.rr.7May-be-operation 7 (2 source registers)Zimop
mop.rr.NZimop
mretMachine-mode Return from TrapPrivileged base (mret, wfi)
mulSigned multiplyM
mulhSigned multiply highM
mulhsuSigned/unsigned multiply highM
mulhuUnsigned multiply highM
mulwSigned 32-bit multiplyM
mvpseudo-opRV32I/RV64I base integer

CSRs starting with M (188)

NameAddressDescription
marchid0xF12Architecture ID
mcause0x342Machine trap cause
mconfigptr0xF15Pointer to configuration data structure
mcontext0x7A8Machine-mode context register
mcounteren0x306Machine counter enable
mcountinhibit0x320Machine counter-inhibit register
mctrctl0x34EMachine Control Transfer Records Control Register
mcycle0xB00Machine cycle counter
mcyclecfg0x321Machine cycle counter configuration register
mcyclecfgh0x721Upper 32 bits of mcyclecfg, RV32 only
mcycleh0xB80Upper 32 bits of mcycle, RV32 only
medeleg0x302Machine exception delegation register
medelegh0x312Upper 32 bits of medeleg, RV32 only
menvcfg0x30AMachine environment configuration register
menvcfgh0x31AUpper 32 bits of menvcfg, RV32 only
mepc0x341Machine exception program counter
mhartid0xF14Hardware thread ID
mhpmcounter30xB03Machine performance-monitoring counter
mhpmcounter3h0xB83Upper 32 bits of mhpmcounter3, RV32 only
mhpmcounter40xB04Machine performance-monitoring counter
mhpmcounter4h0xB84Upper 32 bits of mhpmcounter4, RV32 only
mhpmcounter50xB05Machine performance-monitoring counter
mhpmcounter5h0xB85Upper 32 bits of mhpmcounter5, RV32 only
mhpmcounter60xB06Machine performance-monitoring counter
mhpmcounter6h0xB86Upper 32 bits of mhpmcounter6, RV32 only
mhpmcounter70xB07Machine performance-monitoring counter
mhpmcounter7h0xB87Upper 32 bits of mhpmcounter7, RV32 only
mhpmcounter80xB08Machine performance-monitoring counter
mhpmcounter8h0xB88Upper 32 bits of mhpmcounter8, RV32 only
mhpmcounter90xB09Machine performance-monitoring counter
mhpmcounter9h0xB89Upper 32 bits of mhpmcounter9, RV32 only
mhpmcounter100xB0AMachine performance-monitoring counter
mhpmcounter10h0xB8AUpper 32 bits of mhpmcounter10, RV32 only
mhpmcounter110xB0BMachine performance-monitoring counter
mhpmcounter11h0xB8BUpper 32 bits of mhpmcounter11, RV32 only
mhpmcounter120xB0CMachine performance-monitoring counter
mhpmcounter12h0xB8CUpper 32 bits of mhpmcounter12, RV32 only
mhpmcounter130xB0DMachine performance-monitoring counter
mhpmcounter13h0xB8DUpper 32 bits of mhpmcounter13, RV32 only
mhpmcounter140xB0EMachine performance-monitoring counter
mhpmcounter14h0xB8EUpper 32 bits of mhpmcounter14, RV32 only
mhpmcounter150xB0FMachine performance-monitoring counter
mhpmcounter15h0xB8FUpper 32 bits of mhpmcounter15, RV32 only
mhpmcounter160xB10Machine performance-monitoring counter
mhpmcounter16h0xB90Upper 32 bits of mhpmcounter16, RV32 only
mhpmcounter170xB11Machine performance-monitoring counter
mhpmcounter17h0xB91Upper 32 bits of mhpmcounter17, RV32 only
mhpmcounter180xB12Machine performance-monitoring counter
mhpmcounter18h0xB92Upper 32 bits of mhpmcounter18, RV32 only
mhpmcounter190xB13Machine performance-monitoring counter
mhpmcounter19h0xB93Upper 32 bits of mhpmcounter19, RV32 only
mhpmcounter200xB14Machine performance-monitoring counter
mhpmcounter20h0xB94Upper 32 bits of mhpmcounter20, RV32 only
mhpmcounter210xB15Machine performance-monitoring counter
mhpmcounter21h0xB95Upper 32 bits of mhpmcounter21, RV32 only
mhpmcounter220xB16Machine performance-monitoring counter
mhpmcounter22h0xB96Upper 32 bits of mhpmcounter22, RV32 only
mhpmcounter230xB17Machine performance-monitoring counter
mhpmcounter23h0xB97Upper 32 bits of mhpmcounter23, RV32 only
mhpmcounter240xB18Machine performance-monitoring counter
mhpmcounter24h0xB98Upper 32 bits of mhpmcounter24, RV32 only
mhpmcounter250xB19Machine performance-monitoring counter
mhpmcounter25h0xB99Upper 32 bits of mhpmcounter25, RV32 only
mhpmcounter260xB1AMachine performance-monitoring counter
mhpmcounter26h0xB9AUpper 32 bits of mhpmcounter26, RV32 only
mhpmcounter270xB1BMachine performance-monitoring counter
mhpmcounter27h0xB9BUpper 32 bits of mhpmcounter27, RV32 only
mhpmcounter280xB1CMachine performance-monitoring counter
mhpmcounter28h0xB9CUpper 32 bits of mhpmcounter28, RV32 only
mhpmcounter290xB1DMachine performance-monitoring counter
mhpmcounter29h0xB9DUpper 32 bits of mhpmcounter29, RV32 only
mhpmcounter300xB1EMachine performance-monitoring counter
mhpmcounter30h0xB9EUpper 32 bits of mhpmcounter30, RV32 only
mhpmcounter310xB1FMachine performance-monitoring counter
mhpmcounter31h0xB9FUpper 32 bits of mhpmcounter31, RV32 only
mhpmevent30x323Machine performance-monitoring event selector
mhpmevent3h0x723Upper 32 bits of mhpmevent3, RV32 only
mhpmevent40x324Machine performance-monitoring event selector
mhpmevent4h0x724Upper 32 bits of mhpmevent4, RV32 only
mhpmevent50x325Machine performance-monitoring event selector
mhpmevent5h0x725Upper 32 bits of mhpmevent5, RV32 only
mhpmevent60x326Machine performance-monitoring event selector
mhpmevent6h0x726Upper 32 bits of mhpmevent6, RV32 only
mhpmevent70x327Machine performance-monitoring event selector
mhpmevent7h0x727Upper 32 bits of mhpmevent7, RV32 only
mhpmevent80x328Machine performance-monitoring event selector
mhpmevent8h0x728Upper 32 bits of mhpmevent8, RV32 only
mhpmevent90x329Machine performance-monitoring event selector
mhpmevent9h0x729Upper 32 bits of mhpmevent9, RV32 only
mhpmevent100x32AMachine performance-monitoring event selector
mhpmevent10h0x72AUpper 32 bits of mhpmevent10, RV32 only
mhpmevent110x32BMachine performance-monitoring event selector
mhpmevent11h0x72BUpper 32 bits of mhpmevent11, RV32 only
mhpmevent120x32CMachine performance-monitoring event selector
mhpmevent12h0x72CUpper 32 bits of mhpmevent12, RV32 only
mhpmevent130x32DMachine performance-monitoring event selector
mhpmevent13h0x72DUpper 32 bits of mhpmevent13, RV32 only
mhpmevent140x32EMachine performance-monitoring event selector
mhpmevent14h0x72EUpper 32 bits of mhpmevent14, RV32 only
mhpmevent150x32FMachine performance-monitoring event selector
mhpmevent15h0x72FUpper 32 bits of mhpmevent15, RV32 only
mhpmevent160x330Machine performance-monitoring event selector
mhpmevent16h0x730Upper 32 bits of mhpmevent16, RV32 only
mhpmevent170x331Machine performance-monitoring event selector
mhpmevent17h0x731Upper 32 bits of mhpmevent17, RV32 only
mhpmevent180x332Machine performance-monitoring event selector
mhpmevent18h0x732Upper 32 bits of mhpmevent18, RV32 only
mhpmevent190x333Machine performance-monitoring event selector
mhpmevent19h0x733Upper 32 bits of mhpmevent19, RV32 only
mhpmevent200x334Machine performance-monitoring event selector
mhpmevent20h0x734Upper 32 bits of mhpmevent20, RV32 only
mhpmevent210x335Machine performance-monitoring event selector
mhpmevent21h0x735Upper 32 bits of mhpmevent21, RV32 only
mhpmevent220x336Machine performance-monitoring event selector
mhpmevent22h0x736Upper 32 bits of mhpmevent22, RV32 only
mhpmevent230x337Machine performance-monitoring event selector
mhpmevent23h0x737Upper 32 bits of mhpmevent23, RV32 only
mhpmevent240x338Machine performance-monitoring event selector
mhpmevent24h0x738Upper 32 bits of mhpmevent24, RV32 only
mhpmevent250x339Machine performance-monitoring event selector
mhpmevent25h0x739Upper 32 bits of mhpmevent25, RV32 only
mhpmevent260x33AMachine performance-monitoring event selector
mhpmevent26h0x73AUpper 32 bits of mhpmevent26, RV32 only
mhpmevent270x33BMachine performance-monitoring event selector
mhpmevent27h0x73BUpper 32 bits of mhpmevent27, RV32 only
mhpmevent280x33CMachine performance-monitoring event selector
mhpmevent28h0x73CUpper 32 bits of mhpmevent28, RV32 only
mhpmevent290x33DMachine performance-monitoring event selector
mhpmevent29h0x73DUpper 32 bits of mhpmevent29, RV32 only
mhpmevent300x33EMachine performance-monitoring event selector
mhpmevent30h0x73EUpper 32 bits of mhpmevent30, RV32 only
mhpmevent310x33FMachine performance-monitoring event selector
mhpmevent31h0x73FUpper 32 bits of mhpmevent31, RV32 only
mideleg0x303Machine interrupt delegation register
midelegh0x313Upper 32 bits of mideleg, RV32 only
mie0x304Machine interrupt-enable register
mieh0x314Upper 32 bits of mie, RV32 only
mimpid0xF13Implementation ID
minstret0xB02Machine instructions-retired counter
minstretcfg0x322Machine instret counter configuration register
minstretcfgh0x722Upper 32 bits of minstretcfg, RV32 only
minstreth0xB82Upper 32 bits of minstret, RV32 only
mintstatus0x346
mip0x344Machine interrupt pending
miph0x354Upper 32 bits of mip, RV32 only
mireg0x351Machine indirect register alias
mireg20x352Machine indirect register alias 2
mireg30x353Machine indirect register alias 3
mireg40x355Machine indirect register alias 4
mireg50x356Machine indirect register alias 5
mireg60x357Machine indirect register alias 6
misa0x301ISA and extensions
miselect0x350Machine indirect register select
mncause0x742Resumable NMI cause
mnepc0x741Resumable NMI program counter
mnscratch0x740Resumable NMI scratch register
mnstatus0x744Resumable NMI status
mnxti0x345
mpmpdeleg0x316
mscontext0x7AAMachine Supervisor Context
mscratch0x340Machine scratch register
mscratchcsw0x348
mscratchcswl0x349
mseccfg0x747Machine security configuration register
mseccfgh0x757Upper 32 bits of mseccfg, RV32 only
mstateen00x30CMachine State Enable 0 Register
mstateen0h0x31CUpper 32 bits of Machine State Enable 0 Register, RV32 only
mstateen10x30DMachine State Enable 1 Register
mstateen1h0x31DUpper 32 bits of Machine State Enable 1 Register, RV32 only
mstateen20x30EMachine State Enable 2 Register
mstateen2h0x31EUpper 32 bits of Machine State Enable 2 Register, RV32 only
mstateen30x30FMachine State Enable 3 Register
mstateen3h0x31FUpper 32 bits of Machine State Enable 3 Register, RV32 only
mstatus0x300Machine status register
mstatush0x310Upper 32 bits of mstatus, RV32 only
mtinst0x34AMachine trap instruction (transformed)
mtopei0x35CMachine top external interrupt
mtopi0xFB0Machine top interrupt
mtval0x343Machine trap value
mtval20x34BMachine second trap value
mtvec0x305Machine trap-handler base address
mtvt0x307
mtype0xC23
mvendorid0xF11Vendor ID
mvien0x308Machine virtual interrupt enables
mvienh0x318Upper 32 bits of mvien, RV32 only
mvip0x309Machine virtual interrupt-pending bits
mviph0x319Upper 32 bits of mvip, RV32 only