You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[RISCV] For rv32, accept constants like 0xfffff800 as a valid simm12.
Internally we store constants in int64_t after parsing, but this is
kind of an implementation detail. If we only supported rv32, we might
have chosen int32_t.
For rv32, I think it makes sense to accept the constants that we
would accept if int32_t was the internal type. In fact we already
do this for the `li` alias. This patch extends this to sign
extended constants for other instructions.
This matches the GNU assembler. The difference between LLVM and gcc
was previously noted here. riscv-non-isa/riscv-asm-manual#71
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D144166
Copy file name to clipboardExpand all lines: llvm/test/MC/RISCV/rv32c-only-valid.s
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,3 +21,8 @@
21
21
# CHECK-NO-RV32: error: instruction requires the following: RV32I Base Instruction Set{{$}}
22
22
# CHECK-NO-RV32-AND-EXT: error: instruction requires the following: 'C' (Compressed Instructions) or 'Zca' (part of the C extension, excluding compressed floating point loads/stores), RV32I Base Instruction Set{{$}}
0 commit comments