Commit 29e4fcc
committed
[riscv] Fix the disassembler's handling of C.LUI when imm=0
According to the RISC-V spec: "C.LUI is valid only when rd≠{x0,x2},
and when the immediate is not equal to zero. The code points with
imm=0 are reserved".
This change makes the disassembler consider code
points with imm=0 as illegal. It introduces a test which exercises
every C.LUI opcode including the illegal ones but excluding those
assigned to C.ADDI16SP). Output for +c, +c +Zcmop, and +c
+no-rvc-hints is checked.1 parent 4277255 commit 29e4fcc
File tree
2 files changed
+2076
-0
lines changed- llvm
- lib/Target/RISCV/Disassembler
- test/MC/RISCV
2 files changed
+2076
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
456 | 459 | | |
457 | 460 | | |
458 | 461 | | |
| |||
0 commit comments