From df313ff6975ba4f902b5cb8a84b4998efe2cd173 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 3 Jul 2013 09:19:58 +0000 Subject: [PATCH] [SystemZ] Rename mapping table fields Rename Function->DispKey and PairType->DispSize. I'd originally used "Function" because I thought it might be useful for other InstMappings. However, it turns out that having two very similar instructions with the same Function makes it pretty useless for anything other than the displacement size key. Other InstMappings will want the key to be defined for only one instruction in the pair. No behavioural change intended. llvm-svn: 185526 --- .../lib/Target/SystemZ/SystemZInstrFormats.td | 68 +++++++++---------- llvm/lib/Target/SystemZ/SystemZInstrInfo.td | 6 +- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/llvm/lib/Target/SystemZ/SystemZInstrFormats.td b/llvm/lib/Target/SystemZ/SystemZInstrFormats.td index 58110ecec2a8..d720feefd3bd 100644 --- a/llvm/lib/Target/SystemZ/SystemZInstrFormats.td +++ b/llvm/lib/Target/SystemZ/SystemZInstrFormats.td @@ -21,12 +21,12 @@ class InstSystemZ opcode, SDPatternOperator operator, multiclass StoreRXPair rxOpcode, bits<16> rxyOpcode, SDPatternOperator operator, RegisterOperand cls> { - let Function = mnemonic ## #cls in { - let PairType = "12" in + let DispKey = mnemonic ## #cls in { + let DispSize = "12" in def "" : StoreRX; - let PairType = "20" in + let DispSize = "20" in def Y : StoreRXY; } } @@ -549,10 +549,10 @@ class StoreSIL opcode, SDPatternOperator operator, multiclass StoreSIPair siOpcode, bits<16> siyOpcode, SDPatternOperator operator, Immediate imm> { - let Function = mnemonic in { - let PairType = "12" in + let DispKey = mnemonic in { + let DispSize = "12" in def "" : StoreSI; - let PairType = "20" in + let DispSize = "20" in def Y : StoreSIY; } } @@ -624,10 +624,10 @@ class UnaryRXY opcode, SDPatternOperator operator, multiclass UnaryRXPair rxOpcode, bits<16> rxyOpcode, SDPatternOperator operator, RegisterOperand cls> { - let Function = mnemonic ## #cls in { - let PairType = "12" in + let DispKey = mnemonic ## #cls in { + let DispSize = "12" in def "" : UnaryRX; - let PairType = "20" in + let DispSize = "20" in def Y : UnaryRXY; } } @@ -710,10 +710,10 @@ class BinaryRXY opcode, SDPatternOperator operator, multiclass BinaryRXPair rxOpcode, bits<16> rxyOpcode, SDPatternOperator operator, RegisterOperand cls, SDPatternOperator load> { - let Function = mnemonic ## #cls in { - let PairType = "12" in + let DispKey = mnemonic ## #cls in { + let DispSize = "12" in def "" : BinaryRX; - let PairType = "20" in + let DispSize = "20" in def Y : BinaryRXY; } @@ -740,10 +740,10 @@ class BinarySIY opcode, SDPatternOperator operator, multiclass BinarySIPair siOpcode, bits<16> siyOpcode, SDPatternOperator operator, Operand imm> { - let Function = mnemonic ## #cls in { - let PairType = "12" in + let DispKey = mnemonic ## #cls in { + let DispSize = "12" in def "" : BinarySI; - let PairType = "20" in + let DispSize = "20" in def Y : BinarySIY; } } @@ -829,11 +829,11 @@ class CompareRXY opcode, SDPatternOperator operator, multiclass CompareRXPair rxOpcode, bits<16> rxyOpcode, SDPatternOperator operator, RegisterOperand cls, SDPatternOperator load> { - let Function = mnemonic ## #cls in { - let PairType = "12" in + let DispKey = mnemonic ## #cls in { + let DispSize = "12" in def "" : CompareRX; - let PairType = "20" in + let DispSize = "20" in def Y : CompareRXY; } @@ -868,10 +868,10 @@ class CompareSIY opcode, SDPatternOperator operator, multiclass CompareSIPair siOpcode, bits<16> siyOpcode, SDPatternOperator operator, SDPatternOperator load, Immediate imm> { - let Function = mnemonic in { - let PairType = "12" in + let DispKey = mnemonic in { + let DispSize = "12" in def "" : CompareSI; - let PairType = "20" in + let DispSize = "20" in def Y : CompareSIY; } @@ -922,10 +922,10 @@ class CmpSwapRSY opcode, SDPatternOperator operator, multiclass CmpSwapRSPair rsOpcode, bits<16> rsyOpcode, SDPatternOperator operator, RegisterOperand cls> { - let Function = mnemonic ## #cls in { - let PairType = "12" in + let DispKey = mnemonic ## #cls in { + let DispSize = "12" in def "" : CmpSwapRS; - let PairType = "20" in + let DispSize = "20" in def Y : CmpSwapRSY; } } diff --git a/llvm/lib/Target/SystemZ/SystemZInstrInfo.td b/llvm/lib/Target/SystemZ/SystemZInstrInfo.td index 44be5da4e255..44b28fd0b60c 100644 --- a/llvm/lib/Target/SystemZ/SystemZInstrInfo.td +++ b/llvm/lib/Target/SystemZ/SystemZInstrInfo.td @@ -424,12 +424,12 @@ def STRVG : StoreRXY<"strvg", 0xE32F, storeu, GR64>; // Load BDX-style addresses. let neverHasSideEffects = 1, isAsCheapAsAMove = 1, isReMaterializable = 1, - Function = "la" in { - let PairType = "12" in + 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)]>; - let PairType = "20" in + let DispSize = "20" in def LAY : InstRXY<0xE371, (outs GR64:$R1), (ins laaddr20pair:$XBD2), "lay\t$R1, $XBD2", [(set GR64:$R1, laaddr20pair:$XBD2)]>;