Skip to content

Commit

Permalink
NMSIS/Core: Rename mdcause bitfields to ptyp of MDCAUSE csr
Browse files Browse the repository at this point in the history
ptyp is the new name of MDCAUSE bit 2:0

Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Aug 7, 2024
1 parent 504a13b commit c4ef443
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions NMSIS/Core/Include/core_feature_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ typedef union {
*/
typedef union {
struct {
rv_csr_t mdcause:2; /*!< bit: 0..1 More detailed exception information as MCAUSE supplement */
rv_csr_t _reserved0:__RISCV_XLEN-2; /*!< bit: 2..XLEN-1 Reserved */
rv_csr_t ptyp:3; /*!< bit: 0..2 More detailed exception information as MCAUSE supplement */
rv_csr_t _reserved0:__RISCV_XLEN-3; /*!< bit: 3..XLEN-1 Reserved */
} b; /*!< Structure used for bit access */
rv_csr_t d; /*!< Type used for csr data access */
} CSR_MDCAUSE_Type;
Expand Down
3 changes: 2 additions & 1 deletion NMSIS/Core/Include/riscv_encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@
#define MSUBM_PTYP (0x3<<8)
#define MSUBM_TYP (0x3<<6)

#define MDCAUSE_MDCAUSE (0x3)
#define MDCAUSE_MDCAUSE (0x7)
#define MDCAUSE_PTYP (0x7)

#define MMISC_CTL_LDSPEC_ENABLE (1<<12)
#define MMISC_CTL_SIJUMP_ENABLE (1<<11)
Expand Down

0 comments on commit c4ef443

Please sign in to comment.