Changeset View
Changeset View
Standalone View
Standalone View
sys/riscv/include/riscvreg.h
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | |||||
#define MIP_SEIP (1 << 9) | #define MIP_SEIP (1 << 9) | ||||
/* Note: sip register has no SIP_STIP bit in Spike simulator */ | /* Note: sip register has no SIP_STIP bit in Spike simulator */ | ||||
#define SIP_SSIP (1 << 1) | #define SIP_SSIP (1 << 1) | ||||
#define SIP_STIP (1 << 5) | #define SIP_STIP (1 << 5) | ||||
#define SATP_PPN_S 0 | #define SATP_PPN_S 0 | ||||
#define SATP_PPN_M (0xfffffffffff << SATP_PPN_S) | #define SATP_PPN_M (0xfffffffffffUL << SATP_PPN_S) | ||||
jhb: These changes seem like an unrelated cleanup that could be earlier? Also, does this constant… | |||||
Done Inline ActionsYeah, this is here just because this commit adds the first use of SATP_MODE_M. I don't think there's another suitable commit to squash this into. I suppose I could have a separate commit for this part. I'll add the UL suffix here too just for consistency, but yeah I believe it's correct as is. markj: Yeah, this is here just because this commit adds the first use of SATP_MODE_M. I don't think… | |||||
#define SATP_ASID_S 44 | #define SATP_ASID_S 44 | ||||
#define SATP_ASID_M (0xffff << SATP_ASID_S) | #define SATP_ASID_M (0xffffUL << SATP_ASID_S) | ||||
#define SATP_MODE_S 60 | #define SATP_MODE_S 60 | ||||
#define SATP_MODE_M (0xf << SATP_MODE_S) | #define SATP_MODE_M (0xfUL << SATP_MODE_S) | ||||
#define SATP_MODE_SV39 (8ULL << SATP_MODE_S) | #define SATP_MODE_SV39 (8ULL << SATP_MODE_S) | ||||
#define SATP_MODE_SV48 (9ULL << SATP_MODE_S) | #define SATP_MODE_SV48 (9ULL << SATP_MODE_S) | ||||
#define XLEN __riscv_xlen | #define XLEN __riscv_xlen | ||||
#define XLEN_BYTES (XLEN / 8) | #define XLEN_BYTES (XLEN / 8) | ||||
#define INSN_SIZE 4 | #define INSN_SIZE 4 | ||||
#define INSN_C_SIZE 2 | #define INSN_C_SIZE 2 | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |
These changes seem like an unrelated cleanup that could be earlier? Also, does this constant need UL? Perhaps it is auto-promoted as it is already bigger than MAX_INT?