Skip to content

Commit 41b6f0f

Browse files
authored
Merge pull request #36 from visitorckw/fix-shift-too-many-bits
Fix undefined behavior in RV_MARCHID definition
2 parents 90ddf1c + b790a33 commit 41b6f0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static inline sbi_ret_t handle_sbi_ecall_RST(vm_t *vm, int32_t fid)
185185
}
186186

187187
#define RV_MVENDORID 0x12345678
188-
#define RV_MARCHID ((1 << 31) | 1)
188+
#define RV_MARCHID ((1ULL << 31) | 1)
189189
#define RV_MIMPID 1
190190

191191
static inline sbi_ret_t handle_sbi_ecall_BASE(vm_t *vm, int32_t fid)

0 commit comments

Comments
 (0)