From 37bd451a550d4724c1c2e6c3111e9a0b33bfad9c Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Tue, 8 Nov 2016 18:32:50 +0000 Subject: [PATCH] [SystemZ] Rename some Inst* instruction format classes Now that we've added instruction format subclasses like InstRIb, it makes sense to rename the old InstRI to InstRIa. Similar for InstRX, InstRXY, InstRS, InstRSY, and InstSS. No functional change. llvm-svn: 286266 --- .../lib/Target/SystemZ/SystemZInstrFormats.td | 168 +++++++++--------- llvm/lib/Target/SystemZ/SystemZInstrInfo.td | 24 +-- 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/llvm/lib/Target/SystemZ/SystemZInstrFormats.td b/llvm/lib/Target/SystemZ/SystemZInstrFormats.td index aede5497c84f..071e3d605165 100644 --- a/llvm/lib/Target/SystemZ/SystemZInstrFormats.td +++ b/llvm/lib/Target/SystemZ/SystemZInstrFormats.td @@ -177,7 +177,7 @@ class InstI op, dag outs, dag ins, string asmstr, list pattern> let Inst{7-0} = I1; } -class InstRI op, dag outs, dag ins, string asmstr, list pattern> +class InstRIa op, dag outs, dag ins, string asmstr, list pattern> : InstSystemZ<4, outs, ins, asmstr, pattern> { field bits<32> Inst; field bits<32> SoftFail = 0; @@ -328,7 +328,7 @@ class InstRIEg op, dag outs, dag ins, string asmstr, list pattern> let Inst{7-0} = op{7-0}; } -class InstRIL op, dag outs, dag ins, string asmstr, list pattern> +class InstRILa op, dag outs, dag ins, string asmstr, list pattern> : InstSystemZ<6, outs, ins, asmstr, pattern> { field bits<48> Inst; field bits<48> SoftFail = 0; @@ -483,7 +483,7 @@ class InstRRS op, dag outs, dag ins, string asmstr, list pattern> let Inst{7-0} = op{7-0}; } -class InstRX op, dag outs, dag ins, string asmstr, list pattern> +class InstRXa op, dag outs, dag ins, string asmstr, list pattern> : InstSystemZ<4, outs, ins, asmstr, pattern> { field bits<32> Inst; field bits<32> SoftFail = 0; @@ -551,7 +551,7 @@ class InstRXF op, dag outs, dag ins, string asmstr, list pattern> let HasIndex = 1; } -class InstRXY op, dag outs, dag ins, string asmstr, list pattern> +class InstRXYa op, dag outs, dag ins, string asmstr, list pattern> : InstSystemZ<6, outs, ins, asmstr, pattern> { field bits<48> Inst; field bits<48> SoftFail = 0; @@ -585,7 +585,7 @@ class InstRXYb op, dag outs, dag ins, string asmstr, list pattern> let HasIndex = 1; } -class InstRS op, dag outs, dag ins, string asmstr, list pattern> +class InstRSa op, dag outs, dag ins, string asmstr, list pattern> : InstSystemZ<4, outs, ins, asmstr, pattern> { field bits<32> Inst; field bits<32> SoftFail = 0; @@ -630,7 +630,7 @@ class InstRSI op, dag outs, dag ins, string asmstr, list pattern> let Inst{15-0} = RI2; } -class InstRSY op, dag outs, dag ins, string asmstr, list pattern> +class InstRSYa op, dag outs, dag ins, string asmstr, list pattern> : InstSystemZ<6, outs, ins, asmstr, pattern> { field bits<48> Inst; field bits<48> SoftFail = 0; @@ -708,7 +708,7 @@ class InstSIY op, dag outs, dag ins, string asmstr, list pattern> let Has20BitOffset = 1; } -class InstSS op, dag outs, dag ins, string asmstr, list pattern> +class InstSSa op, dag outs, dag ins, string asmstr, list pattern> : InstSystemZ<6, outs, ins, asmstr, pattern> { field bits<48> Inst; field bits<48> SoftFail = 0; @@ -1165,7 +1165,7 @@ class DirectiveInsnE pattern> } class DirectiveInsnRI pattern> - : InstRI<0, outs, ins, asmstr, pattern> { + : InstRIa<0, outs, ins, asmstr, pattern> { bits<32> enc; let Inst{31-24} = enc{31-24}; @@ -1181,7 +1181,7 @@ class DirectiveInsnRIE pattern> } class DirectiveInsnRIL pattern> - : InstRIL<0, outs, ins, asmstr, pattern> { + : InstRILa<0, outs, ins, asmstr, pattern> { bits<48> enc; string type; @@ -1227,7 +1227,7 @@ class DirectiveInsnRRS pattern> } class DirectiveInsnRS pattern> - : InstRS<0, outs, ins, asmstr, pattern> { + : InstRSa<0, outs, ins, asmstr, pattern> { bits<32> enc; let Inst{31-24} = enc{31-24}; @@ -1235,7 +1235,7 @@ class DirectiveInsnRS pattern> // RSE is like RSY except with a 12 bit displacement (instead of 20). class DirectiveInsnRSE pattern> - : InstRSY<6, outs, ins, asmstr, pattern> { + : InstRSYa<6, outs, ins, asmstr, pattern> { bits <48> enc; let Inst{47-40} = enc{47-40}; @@ -1252,7 +1252,7 @@ class DirectiveInsnRSI pattern> } class DirectiveInsnRSY pattern> - : InstRSY<0, outs, ins, asmstr, pattern> { + : InstRSYa<0, outs, ins, asmstr, pattern> { bits<48> enc; let Inst{47-40} = enc{47-40}; @@ -1260,7 +1260,7 @@ class DirectiveInsnRSY pattern> } class DirectiveInsnRX pattern> - : InstRX<0, outs, ins, asmstr, pattern> { + : InstRXa<0, outs, ins, asmstr, pattern> { bits<32> enc; let Inst{31-24} = enc{31-24}; @@ -1285,7 +1285,7 @@ class DirectiveInsnRXF pattern> } class DirectiveInsnRXY pattern> - : InstRXY<0, outs, ins, asmstr, pattern> { + : InstRXYa<0, outs, ins, asmstr, pattern> { bits<48> enc; let Inst{47-40} = enc{47-40}; @@ -1576,8 +1576,8 @@ class CallRR opcode> mnemonic#"\t$R1, $R2", []>; class CallRX opcode> - : InstRX; + : InstRXa; class CondBranchRI opcode, SDPatternOperator operator = null_frag> @@ -1825,15 +1825,15 @@ class BranchBinaryRSI opcode, RegisterOperand cls> class LoadMultipleRS opcode, RegisterOperand cls, AddressingMode mode = bdaddr12only> - : InstRS { + : InstRSa { let mayLoad = 1; } class LoadMultipleRSY opcode, RegisterOperand cls, AddressingMode mode = bdaddr20only> - : InstRSY { + : InstRSYa { let mayLoad = 1; } @@ -1869,9 +1869,9 @@ class StoreRILPC opcode, SDPatternOperator operator, class StoreRX opcode, SDPatternOperator operator, RegisterOperand cls, bits<5> bytes, AddressingMode mode = bdxaddr12only> - : InstRX { + : InstRXa { let OpKey = mnemonic ## cls; let OpType = "mem"; let mayStore = 1; @@ -1881,9 +1881,9 @@ class StoreRX opcode, SDPatternOperator operator, class StoreRXY opcode, SDPatternOperator operator, RegisterOperand cls, bits<5> bytes, AddressingMode mode = bdxaddr20only> - : InstRXY { + : InstRXYa { let OpKey = mnemonic ## cls; let OpType = "mem"; let mayStore = 1; @@ -1924,15 +1924,15 @@ class StoreLengthVRSb opcode, class StoreMultipleRS opcode, RegisterOperand cls, AddressingMode mode = bdaddr12only> - : InstRS { + : InstRSa { let mayStore = 1; } class StoreMultipleRSY opcode, RegisterOperand cls, AddressingMode mode = bdaddr20only> - : InstRSY { + : InstRSYa { let mayStore = 1; } @@ -2139,15 +2139,15 @@ multiclass CondUnaryRIEPair opcode, class UnaryRI opcode, SDPatternOperator operator, RegisterOperand cls, Immediate imm> - : InstRI; + : InstRIa; class UnaryRIL opcode, SDPatternOperator operator, RegisterOperand cls, Immediate imm> - : InstRIL; + : InstRILa; class UnaryRILPC opcode, SDPatternOperator operator, RegisterOperand cls> @@ -2217,9 +2217,9 @@ multiclass CondUnaryRSYPair opcode, class UnaryRX opcode, SDPatternOperator operator, RegisterOperand cls, bits<5> bytes, AddressingMode mode = bdxaddr12only> - : InstRX { + : InstRXa { let OpKey = mnemonic ## cls; let OpType = "mem"; let mayLoad = 1; @@ -2241,9 +2241,9 @@ class UnaryRXE opcode, SDPatternOperator operator, class UnaryRXY opcode, SDPatternOperator operator, RegisterOperand cls, bits<5> bytes, AddressingMode mode = bdxaddr20only> - : InstRXY { + : InstRXYa { let OpKey = mnemonic ## cls; let OpType = "mem"; let mayLoad = 1; @@ -2413,9 +2413,9 @@ multiclass BinaryRREAndK opcode1, bits<16> opcode2, class BinaryRI opcode, SDPatternOperator operator, RegisterOperand cls, Immediate imm> - : InstRI { + : InstRIa { let Constraints = "$R1 = $R1src"; let DisableEncoding = "$R1src"; } @@ -2440,18 +2440,18 @@ multiclass BinaryRIAndK opcode1, bits<16> opcode2, class BinaryRIL opcode, SDPatternOperator operator, RegisterOperand cls, Immediate imm> - : InstRIL { + : InstRILa { let Constraints = "$R1 = $R1src"; let DisableEncoding = "$R1src"; } class BinaryRS opcode, SDPatternOperator operator, RegisterOperand cls> - : InstRS { + : InstRSa { let R3 = 0; let Constraints = "$R1 = $R1src"; let DisableEncoding = "$R1src"; @@ -2459,9 +2459,9 @@ class BinaryRS opcode, SDPatternOperator operator, class BinaryRSY opcode, SDPatternOperator operator, RegisterOperand cls> - : InstRSY; + : InstRSYa; multiclass BinaryRSAndK opcode1, bits<16> opcode2, SDPatternOperator operator, RegisterOperand cls> { @@ -2477,9 +2477,9 @@ multiclass BinaryRSAndK opcode1, bits<16> opcode2, class BinaryRX opcode, SDPatternOperator operator, RegisterOperand cls, SDPatternOperator load, bits<5> bytes, AddressingMode mode = bdxaddr12only> - : InstRX { + : InstRXa { let OpKey = mnemonic ## cls; let OpType = "mem"; let Constraints = "$R1 = $R1src"; @@ -2506,9 +2506,9 @@ class BinaryRXE opcode, SDPatternOperator operator, class BinaryRXY opcode, SDPatternOperator operator, RegisterOperand cls, SDPatternOperator load, bits<5> bytes, AddressingMode mode = bdxaddr20only> - : InstRXY { + : InstRXYa { let OpKey = mnemonic ## cls; let OpType = "mem"; let Constraints = "$R1 = $R1src"; @@ -2816,17 +2816,17 @@ class CompareRRE opcode, SDPatternOperator operator, class CompareRI opcode, SDPatternOperator operator, RegisterOperand cls, Immediate imm> - : InstRI { + : InstRIa { let isCompare = 1; } class CompareRIL opcode, SDPatternOperator operator, RegisterOperand cls, Immediate imm> - : InstRIL { + : InstRILa { let isCompare = 1; } @@ -2846,9 +2846,9 @@ class CompareRILPC opcode, SDPatternOperator operator, class CompareRX opcode, SDPatternOperator operator, RegisterOperand cls, SDPatternOperator load, bits<5> bytes, AddressingMode mode = bdxaddr12only> - : InstRX { + : InstRXa { let OpKey = mnemonic ## cls; let OpType = "mem"; let isCompare = 1; @@ -2872,9 +2872,9 @@ class CompareRXE opcode, SDPatternOperator operator, class CompareRXY opcode, SDPatternOperator operator, RegisterOperand cls, SDPatternOperator load, bits<5> bytes, AddressingMode mode = bdxaddr20only> - : InstRXY { + : InstRXYa { let OpKey = mnemonic ## cls; let OpType = "mem"; let isCompare = 1; @@ -3276,18 +3276,18 @@ multiclass QuaternaryOptVRRdSPairGeneric opcode> { class LoadAndOpRSY opcode, SDPatternOperator operator, RegisterOperand cls, AddressingMode mode = bdaddr20only> - : InstRSY { + : InstRSYa { let mayLoad = 1; let mayStore = 1; } class CmpSwapRS opcode, SDPatternOperator operator, RegisterOperand cls, AddressingMode mode = bdaddr12only> - : InstRS { + : InstRSa { let Constraints = "$R1 = $R1src"; let DisableEncoding = "$R1src"; let mayLoad = 1; @@ -3296,9 +3296,9 @@ class CmpSwapRS opcode, SDPatternOperator operator, class CmpSwapRSY opcode, SDPatternOperator operator, RegisterOperand cls, AddressingMode mode = bdaddr20only> - : InstRSY { + : InstRSYa { let Constraints = "$R1 = $R1src"; let DisableEncoding = "$R1src"; let mayLoad = 1; @@ -3550,9 +3550,9 @@ class AtomicLoadWBinaryImm // another instruction to handle the excess. multiclass MemorySS opcode, SDPatternOperator sequence, SDPatternOperator loop> { - def "" : InstSS; + def "" : InstSSa; let usesCustomInserter = 1, hasNoSchedulingInfo = 1 in { def Sequence : Pseudo<(outs), (ins bdaddr12only:$dest, bdaddr12only:$src, imm64:$length), diff --git a/llvm/lib/Target/SystemZ/SystemZInstrInfo.td b/llvm/lib/Target/SystemZ/SystemZInstrInfo.td index 0dba1b579924..3266481df5c0 100644 --- a/llvm/lib/Target/SystemZ/SystemZInstrInfo.td +++ b/llvm/lib/Target/SystemZ/SystemZInstrInfo.td @@ -650,22 +650,22 @@ def STRVG : StoreRXY<"strvg", 0xE32F, z_strvg, GR64, 8>; let hasSideEffects = 0, isAsCheapAsAMove = 1, isReMaterializable = 1, DispKey = "la" in { let DispSize = "12" in - def LA : InstRX<0x41, (outs GR64:$R1), (ins laaddr12pair:$XBD2), - "la\t$R1, $XBD2", - [(set GR64:$R1, laaddr12pair:$XBD2)]>; + def LA : InstRXa<0x41, (outs GR64:$R1), (ins laaddr12pair:$XBD2), + "la\t$R1, $XBD2", + [(set GR64:$R1, laaddr12pair:$XBD2)]>; let DispSize = "20" in - def LAY : InstRXY<0xE371, (outs GR64:$R1), (ins laaddr20pair:$XBD2), - "lay\t$R1, $XBD2", - [(set GR64:$R1, laaddr20pair:$XBD2)]>; + def LAY : InstRXYa<0xE371, (outs GR64:$R1), (ins laaddr20pair:$XBD2), + "lay\t$R1, $XBD2", + [(set GR64:$R1, laaddr20pair:$XBD2)]>; } // Load a PC-relative address. There's no version of this instruction // with a 16-bit offset, so there's no relaxation. let hasSideEffects = 0, isAsCheapAsAMove = 1, isMoveImm = 1, isReMaterializable = 1 in { - def LARL : InstRIL<0xC00, (outs GR64:$R1), (ins pcrel32:$I2), - "larl\t$R1, $I2", - [(set GR64:$R1, pcrel32:$I2)]>; + def LARL : InstRILb<0xC00, (outs GR64:$R1), (ins pcrel32:$RI2), + "larl\t$R1, $RI2", + [(set GR64:$R1, pcrel32:$RI2)]>; } // Load the Global Offset Table address. This will be lowered into a @@ -1573,10 +1573,10 @@ let hasSideEffects = 1, Defs = [CC], mayStore = 1 in []>; let hasSideEffects = 1 in { - def EX : InstRX<0x44, (outs), (ins GR64:$R1, bdxaddr12only:$XBD2), + def EX : InstRXa<0x44, (outs), (ins GR64:$R1, bdxaddr12only:$XBD2), "ex\t$R1, $XBD2", []>; - def EXRL : InstRIL<0xC60, (outs), (ins GR64:$R1, pcrel32:$I2), - "exrl\t$R1, $I2", []>; + def EXRL : InstRILb<0xC60, (outs), (ins GR64:$R1, pcrel32:$RI2), + "exrl\t$R1, $RI2", []>; } let Defs = [CC] in {