Details
Diff Detail
Unit Tests
Time | Test | |
---|---|---|
60 ms | x64 debian > LLVM.Bindings/Go::go.test |
Event Timeline
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
1680 | Does binutils only except literal integers or does it support expressions? | |
1684 | There are no illegal values in the immediate form for vlmul or vsew. The intention was to allow the disassembler to print immediates for reserved encodings. Anything that the disassembler prints must be parseable. We do need to make sure the immedaite fits in 11 bits for vsetvli and 10 bits for vsetivli. |
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
1680 | I have tested the newest master of binutils,
|
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
1680 | Our internal version of bintuils does accept this vsetvli x0, x0, 0xff + 1. I haven't checked binutils compiled with public sources, but I expect they would be the same. The disassembly bugs have been fixed in our internal branch of binutils. I'll find out when they'll be fixed in publicly available sources. |
Support non-canonical syntax:
- vsetivli rd, uimm, 0xabc or vsetvli rd, rs1, 0xabc
- vsetivli rd, uimm, (0xc << N) or vsetvli rd, rs1, (0xc << N)
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
1680 | The latest patch already supports this representation. |
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
927 | I think we need to call evaluateConstantImm here. Since we used evaluateConstantImm in isVTypeImm which can find an immediate that isn't from an MCConstantExpr. I think we should assert that evaluateConstantImm returns true since we checked that in isVTypeImm. |
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
927 | Done. |
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
928 | You can't call evaluateConstantImm from inside the assert. The contents of the assert aren't evaluated in release builds. You'll need to use a variable to capture the result. And cast the variable to void to avoid an unused variable warning in release builds. |
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
928 | done |
LGTM other than trying to use RenderMethod.
llvm/lib/Target/RISCV/RISCVInstrInfoV.td | ||
---|---|---|
25 | I think you can add let RenderMethod = "addVTypeIOperands"; And avoid needing addVTypeI10Operands and addVTypeI11Operands in the assembler |
llvm/lib/Target/RISCV/RISCVInstrInfoV.td | ||
---|---|---|
25 | Thanks for your review, I will commit this patch for her. And will correct this when when doing git commit and git push. |
Capitalize 'if'