Skip to content

Commit

Permalink
fix(literal-size): Change literal from 1ULL to 1UL
Browse files Browse the repository at this point in the history
When compiling for RV32, the expected size of the argument used is 32-bit.
Using 1ULL forces the argument to be 64-bit since shift operations take the
size of the largest operand. This results in the error Werror=arith-conversion
when compiling for RV32

Signed-off-by: Miguel Silva <[email protected]>
  • Loading branch information
miguelafsilva5 authored and josecm committed Oct 18, 2024
1 parent 5eed180 commit 869b24c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arch/riscv/inc/arch/csrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
#define SSTATUS_XS_DIRTY (3ULL << SSTATUS_XS_OFF)
#define SSTATUS_SUM (1ULL << 18)
#define SSTATUS_MXR (1ULL << 19)
#define SSTATUS_SD (1ULL << 63)
#define SSTATUS_SD (1ULL << ((REGLEN * 8) - 1))

#define SIE_USIE (1ULL << 0)
#define SIE_SSIE (1ULL << 1)
Expand Down

0 comments on commit 869b24c

Please sign in to comment.