diff options
author | Paul Bowen-Huggett <paulhuggett@mac.com> | 2025-03-31 17:51:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-31 08:51:34 -0700 |
commit | ea06f7f96fb1ce5a77439cf1a26f97c2f2488648 (patch) | |
tree | f4af4d14001cd65acf085fe6f94afc11f8036a73 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | 799e9053641a6478d3144866a97737b37b87c260 (diff) | |
download | llvm-ea06f7f96fb1ce5a77439cf1a26f97c2f2488648.zip llvm-ea06f7f96fb1ce5a77439cf1a26f97c2f2488648.tar.gz llvm-ea06f7f96fb1ce5a77439cf1a26f97c2f2488648.tar.bz2 |
[RISCV] For RV32C, disassembly of c.slli should fail when immediate > 31 (#133713)
Fixes #133712.
The change causes `c.slli` instructions whose immediate has bit 5 set to
be rejected when disassembling RV32C. Added a test to exhaustively cover
c.slli for 32 bit targets. A minor tweak to make the debug output a
little more readable.
The spec. (20240411) says:
> For RV32C, shamt[5] must be zero; the code points with shamt[5]=1 are
designated for custom extensions. For RV32C and RV64C, the shift amount
must be non-zero; the code points with shamt=0 are HINTs. For all base
ISAs, the code points with rd=x0 are HINTs, except those with shamt[5]=1
in RV32C.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
0 files changed, 0 insertions, 0 deletions