[PATCH] D107309: [RISCV] Move the $rs operand of PseudoStore from outs to ins.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 8 16:08:22 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG20dfe051abe0: [RISCV] Move the $rs operand of PseudoStore from outs to ins. NFC (authored by craig.topper).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107309/new/
https://reviews.llvm.org/D107309
Files:
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/RISCVInstrFormats.td
Index: llvm/lib/Target/RISCV/RISCVInstrFormats.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrFormats.td
+++ llvm/lib/Target/RISCV/RISCVInstrFormats.td
@@ -202,7 +202,7 @@
}
class PseudoFloatLoad<string opcodestr, RegisterClass rdty = GPR>
- : Pseudo<(outs rdty:$rd, GPR:$tmp), (ins bare_symbol:$addr), [], opcodestr, "$rd, $addr, $tmp"> {
+ : Pseudo<(outs GPR:$tmp, rdty:$rd), (ins bare_symbol:$addr), [], opcodestr, "$rd, $addr, $tmp"> {
let hasSideEffects = 0;
let mayLoad = 1;
let mayStore = 0;
@@ -212,7 +212,7 @@
// Pseudo store instructions.
class PseudoStore<string opcodestr, RegisterClass rsty = GPR>
- : Pseudo<(outs rsty:$rs, GPR:$tmp), (ins bare_symbol:$addr), [], opcodestr, "$rs, $addr, $tmp"> {
+ : Pseudo<(outs GPR:$tmp), (ins rsty:$rs, bare_symbol:$addr), [], opcodestr, "$rs, $addr, $tmp"> {
let hasSideEffects = 0;
let mayLoad = 0;
let mayStore = 1;
Index: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
===================================================================
--- llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -2339,10 +2339,10 @@
//
// TmpLabel: AUIPC tmp, %pcrel_hi(symbol)
// [S|L]X rd, %pcrel_lo(TmpLabel)(tmp)
- MCOperand DestReg = Inst.getOperand(0);
+ unsigned DestRegOpIdx = HasTmpReg ? 1 : 0;
+ MCOperand DestReg = Inst.getOperand(DestRegOpIdx);
unsigned SymbolOpIdx = HasTmpReg ? 2 : 1;
- unsigned TmpRegOpIdx = HasTmpReg ? 1 : 0;
- MCOperand TmpReg = Inst.getOperand(TmpRegOpIdx);
+ MCOperand TmpReg = Inst.getOperand(0);
const MCExpr *Symbol = Inst.getOperand(SymbolOpIdx).getExpr();
emitAuipcInstPair(DestReg, TmpReg, Symbol, RISCVMCExpr::VK_RISCV_PCREL_HI,
Opcode, IDLoc, Out);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107309.365051.patch
Type: text/x-patch
Size: 1851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210808/4a088c31/attachment.bin>
More information about the llvm-commits
mailing list