ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

misa

T1 riscv register register
Machine ISA Control
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (Sm)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeM
ExtensionsSm

Summary

Reports the XLEN and "major" extensions supported by the ISA.

Syntax / Encoding

CSR 0x301 (M-mode, RW)

Bitfields (14)

BitsFieldDescription
63:62MXLXLEN in M-mode. [RV32: 31:30, RV64: 63:62]
23XThe X bit will be set if there are any non-standard extensions.
21VIndicates support for the V (vector) extension. [when,"MUTABLE_MISA_V == true"] Writing 0 to this field will cause all attempts to execute a vector instruction to raise an IllegalInstruction trap.
20UIndicates support for the U (user mode) extension. [when,"MUTABLE_MISA_U == true"] Writing 0 to this field will cause all attempts to enter U-mode to raise an exception.
18SIndicates support for the S (supervisor mode) extension. [when,"MUTABLE_MISA_S == true"] Writing 0 to this field will cause all attempts to enter S-mode or access S-mode state to raise an exception.
16QIndicates support for the Q (quad precision float) extension. [when,"MUTABLE_MISA_Q == true"] -- Writing 0 to this field will cause all quad-precision floating point instructions to raise an IllegalInstruction exception. --
12MIndicates support for the M (integer multiply/divide) extension. [when,"MUTABLE_MISA_M == true"] Writing 0 to this field will cause all attempts to execute an integer divide or remainder instruction to raise an IllegalInstruction exception. The multiply instructions are provided by Zmmul and are unaffected.
8IIndicates support for the I (base) extension.
7HIndicates support for the H (hypervisor) extension. [when,"MUTABLE_MISA_H == true"] Writing 0 to this field will cause all attempts to enter VS- or VU- mode, execute a hypervisor instruction, or access a hypervisor CSR to raise an IllegalInstruction fault.
5FIndicates support for the F (single precision float) extension. [when,"MUTABLE_MISA_F == true"] -- Writing 0 to this field will cause all floating point (single and double precision) instructions to raise an IllegalInstruction exception. Writing 0 to this field with misa.D set will result in UNDEFINED behavior. --
3DIndicates support for the D (double precision float) extension. [when,"MUTABLE_MISA_D == true"] -- Writing 0 to this field will cause all double-precision floating point instructions to raise an IllegalInstruction exception. Additionally, the upper 32-bits of the f registers will read as zero. --
2CIndicates support for the C (compressed) extension. [when,"MUTABLE_MISA_C == true"] Writing 0 to this field will cause all compressed instructions to raise an IllegalInstruction exception. Additionally, IALIGN becomes 32.
1BIndicates support for the B (bitmanip) extension.
0AIndicates support for the A (atomic) extension.