[PATCH] D98532: [M68k] Use fixed asm string for MxPseudo instructions
Min-Yih Hsu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 17 13:32:32 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2416f2436334: [M68k] Use fixed asm string for MxPseudo instructions (authored by ricky26, committed by myhsu).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98532/new/
https://reviews.llvm.org/D98532
Files:
llvm/lib/Target/M68k/M68kInstrCompiler.td
llvm/lib/Target/M68k/M68kInstrControl.td
llvm/lib/Target/M68k/M68kInstrData.td
llvm/lib/Target/M68k/M68kInstrFormats.td
Index: llvm/lib/Target/M68k/M68kInstrFormats.td
===================================================================
--- llvm/lib/Target/M68k/M68kInstrFormats.td
+++ llvm/lib/Target/M68k/M68kInstrFormats.td
@@ -364,7 +364,7 @@
}
// M68k PSEUDO INSTRUCTION
-class MxPseudo<dag outs, dag ins, string asmStr = "", list<dag> pattern = []>
- : MxInst<outs, ins, asmStr, pattern> {
+class MxPseudo<dag outs, dag ins, list<dag> pattern = []>
+ : MxInst<outs, ins, "; error: this should not be emitted", pattern> {
let isPseudo = 1;
}
Index: llvm/lib/Target/M68k/M68kInstrData.td
===================================================================
--- llvm/lib/Target/M68k/M68kInstrData.td
+++ llvm/lib/Target/M68k/M68kInstrData.td
@@ -588,10 +588,10 @@
let Defs = [CCR] in {
class MxPseudoMove_RR<MxType DST, MxType SRC, list<dag> PAT = []>
- : MxPseudo<(outs DST.ROp:$dst), (ins SRC.ROp:$src), "", PAT>;
+ : MxPseudo<(outs DST.ROp:$dst), (ins SRC.ROp:$src), PAT>;
class MxPseudoMove_RM<MxType DST, MxOperand SRCOpd, list<dag> PAT = []>
- : MxPseudo<(outs DST.ROp:$dst), (ins SRCOpd:$src), "", PAT>;
+ : MxPseudo<(outs DST.ROp:$dst), (ins SRCOpd:$src), PAT>;
}
/// This group of Pseudos is analogues to the real x86 extending moves, but
Index: llvm/lib/Target/M68k/M68kInstrControl.td
===================================================================
--- llvm/lib/Target/M68k/M68kInstrControl.td
+++ llvm/lib/Target/M68k/M68kInstrControl.td
@@ -264,7 +264,7 @@
def RTS : MxInst<(outs), (ins), "rts", [], MxEncFixed<0x4E75>>;
let isCodeGenOnly = 1 in
-def RET : MxPseudo<(outs), (ins i32imm:$adj, variable_ops), "",
+def RET : MxPseudo<(outs), (ins i32imm:$adj, variable_ops),
[(MxRet timm:$adj)]>;
} // isTerminator = 1, isReturn = 1, isBarrier = 1, hasCtrlDep = 1
@@ -277,11 +277,11 @@
// FIXME These are pseudo ops that should be replaced with Pat<> patterns.
// However, Pat<> can't replicate the destination reg into the inputs of the
// result.
-def SETCS_C8d : MxPseudo<(outs MxDRD8:$dst), (ins), "",
+def SETCS_C8d : MxPseudo<(outs MxDRD8:$dst), (ins),
[(set MxDRD8:$dst, (MxSetCC_C MxCONDcs, CCR))]>;
-def SETCS_C16d : MxPseudo<(outs MxDRD16:$dst), (ins), "",
+def SETCS_C16d : MxPseudo<(outs MxDRD16:$dst), (ins),
[(set MxDRD16:$dst, (MxSetCC_C MxCONDcs, CCR))]>;
-def SETCS_C32d : MxPseudo<(outs MxXRD32:$dst), (ins), "",
+def SETCS_C32d : MxPseudo<(outs MxXRD32:$dst), (ins),
[(set MxXRD32:$dst, (MxSetCC_C MxCONDcs, CCR))]>;
} // Uses = [CCR], Defs = [CCR], isPseudo = 1
Index: llvm/lib/Target/M68k/M68kInstrCompiler.td
===================================================================
--- llvm/lib/Target/M68k/M68kInstrCompiler.td
+++ llvm/lib/Target/M68k/M68kInstrCompiler.td
@@ -57,7 +57,6 @@
let usesCustomInserter = 1, Uses = [CCR] in
class MxCMove<MxType TYPE>
: MxPseudo<(outs TYPE.ROp:$dst), (ins TYPE.ROp:$t, TYPE.ROp:$f, i8imm:$cond),
- "",
[(set TYPE.VT:$dst,
(TYPE.VT (MxCmov TYPE.VT:$t, TYPE.VT:$f, imm:$cond, CCR)))]>;
@@ -78,11 +77,11 @@
let Defs = [SP, CCR], Uses = [SP] in {
def ADJCALLSTACKDOWN
- : MxPseudo<(outs), (ins i32imm:$amt1, i32imm:$amt2), "#ADJCALLSTACKDOWN",
+ : MxPseudo<(outs), (ins i32imm:$amt1, i32imm:$amt2),
[(MxCallSeqStart timm:$amt1, timm:$amt2)]>;
def ADJCALLSTACKUP
- : MxPseudo<(outs), (ins i32imm:$amt1, i32imm:$amt2), "#ADJCALLSTACKUP",
+ : MxPseudo<(outs), (ins i32imm:$amt1, i32imm:$amt2),
[(MxCallSeqEnd timm:$amt1, timm:$amt2)]>;
} // Defs
@@ -124,5 +123,4 @@
let Defs = [SP, CCR], Uses = [SP] in
let usesCustomInserter = 1 in
def SALLOCA : MxPseudo<(outs MxARD32:$dst), (ins MxARD32:$size),
- "# variable sized alloca for segmented stacks",
[(set iPTR:$dst, (MxSegAlloca iPTR:$size))]>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98532.331359.patch
Type: text/x-patch
Size: 3962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210317/61b872f6/attachment.bin>
More information about the llvm-commits
mailing list