mtinst

Machine Trap Instruction Register

When a trap is taken into M-mode, mtinst is written with a value that, if nonzero, provides information about the instruction that trapped, to assist software in handling the trap. The values that may be written to mtinst on a trap are documented in TODO.

mtinst is a WARL register that need only be able to hold the values that the implementation may automatically write to it on a trap.

Attributes

Defining Extension

  • H, version >= H@1.0.0

CSR Address

0x34a

Length

#<ConfiguredArchitecture:0x00007f75efbd67c8>-bit

Privilege Mode

M

Format

This CSR format changes dynamically.

mtinst Format when CSR[misa].MXL == 0
Figure 1. mtinst Format when CSR[misa].MXL == 0
mtinst Format when CSR[misa].MXL == 1
Figure 2. mtinst Format when CSR[misa].MXL == 1

Field Summary

Name Location Type Reset Value

mtinst.VALUE

* 31:0 when CSR[misa].MXL == 0 * 63:0 when CSR[misa].MXL == 1

UNDEFINED_LEGAL

Fields

VALUE

Location
  • 31:0 when CSR[misa].MXL == 0

  • 63:0 when CSR[misa].MXL == 1

Description

Exception-specific information for a trap into M-mode.

Type
Reset value

UNDEFINED_LEGAL