We've supported .insn for non-compressed for a while. This finishes the compressed supported.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
1630 | Why is it weird? |
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
1630 | C0 through C2 aren't numbers, this kind of implies only 0 through 2 are accepted, not also C0 through C2. |
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
1630 | Do you want me to say "opcode must be a valid opcode name or an immediate in the range [0, 2]"? If you've figured out the format for these directives you're probably also looking at the opcode list. |
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
1630 | That sounds fine to me, thanks |
-Use StringSwitch to check Format.
-Update error message.
-Fix check-prefix
Working on error test cases
llvm/test/MC/RISCV/insn_c-invalid.s | ||
---|---|---|
4 ↗ | (On Diff #507545) | For new tests, use [[#@LINE]]. [[@LINE]] is deprecated lit syntax. |
LGTM - I just wonder about if we want to gate this on C/Zca as this patch does. Assuming someone reused the 16-bit encoding space, perhaps they want to using .insn to insert some of their instructions. OTOH, perhaps it's not so likely that the instruction formats would be as they want, at which point .insn isn't very useful.
clang-format not found in user’s local PATH; not linting file.