c.slli/c.srli/c.srai shift amount constraint should accrding to rv32/rv64.
For rv32, shift amount constraint should be [1, 31].
For rv64, shift amount constraint should be [1, 63].
Add uimmlog2xlennonzero to reflect the constraints.
Paths
| Differential D41216
[RISCV] Change shift amount operand of RVC shift instructions to uimmlog2xlennonzero ClosedPublic Authored by shiva0217 on Dec 13 2017, 6:02 PM.
Details Summary c.slli/c.srli/c.srai shift amount constraint should accrding to rv32/rv64. Add uimmlog2xlennonzero to reflect the constraints.
Diff Detail
Event TimelineHerald added subscribers: sabuasal, jordy.potman.lists, johnrusso, rbar. · View Herald TranscriptDec 13 2017, 6:02 PM Comment Actions Thanks, this is a good fix. As a nitpick I'd put the UImmLog2XLenNonZeroAsmOperand and uimmlog2xlennonzero defs exactly where uimm5nonzero was in RISCVInstrInfoC.td, this retains sorting by bitwidth. This revision is now accepted and ready to land.Dec 14 2017, 2:15 AM Closed by commit rL320799: [RISCV] Change shift amount operand of RVC shift instructions to… (authored by asb). · Explain WhyDec 15 2017, 2:21 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 127083 llvm/trunk/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/trunk/lib/Target/RISCV/RISCVInstrInfoC.td
llvm/trunk/test/MC/RISCV/rv32c-invalid.s
llvm/trunk/test/MC/RISCV/rv64c-invalid.s
llvm/trunk/test/MC/RISCV/rv64c-valid.s
|