summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU
diff options
context:
space:
mode:
authorArtem Tamazov <artem.tamazov@amd.com>2016-05-06 19:32:38 +0000
committerArtem Tamazov <artem.tamazov@amd.com>2016-05-06 19:32:38 +0000
commitf0b6b40fa4f0ef91ae8ababc88663abdafcffab2 (patch)
tree0d41f09cfd458015c6712451bf2119c9022d6e5c /llvm/lib/Target/AMDGPU
parentbedb81e09fbab57773602bc7f4447199cd5ec85e (diff)
downloadbcm5719-llvm-f0b6b40fa4f0ef91ae8ababc88663abdafcffab2.tar.gz
bcm5719-llvm-f0b6b40fa4f0ef91ae8ababc88663abdafcffab2.zip
[AMDGPU][llvm-mc] Some refactoring of .td files
Some custom Operands and AsmOperandClasses moved to proper place. No functional changes. Differential Revision: http://reviews.llvm.org/D20012 llvm-svn: 268780
Diffstat (limited to 'llvm/lib/Target/AMDGPU')
-rw-r--r--llvm/lib/Target/AMDGPU/SIInstrInfo.td34
-rw-r--r--llvm/lib/Target/AMDGPU/SIInstructions.td20
2 files changed, 27 insertions, 27 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.td b/llvm/lib/Target/AMDGPU/SIInstrInfo.td
index 327868b9da0..523fdf8d5b1 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.td
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.td
@@ -458,6 +458,33 @@ def sopp_brtarget : Operand<OtherVT> {
def const_ga : Operand<iPTR>;
+def InterpSlot : Operand<i32> {
+ let PrintMethod = "printInterpSlot";
+}
+
+def SendMsgMatchClass : AsmOperandClass {
+ let Name = "SendMsg";
+ let PredicateMethod = "isSendMsg";
+ let ParserMethod = "parseSendMsgOp";
+ let RenderMethod = "addImmOperands";
+}
+
+def SendMsgImm : Operand<i32> {
+ let PrintMethod = "printSendMsg";
+ let ParserMatchClass = SendMsgMatchClass;
+}
+
+def SWaitMatchClass : AsmOperandClass {
+ let Name = "SWaitCnt";
+ let RenderMethod = "addImmOperands";
+ let ParserMethod = "parseSWaitCntOps";
+}
+
+def WAIT_FLAG : Operand <i32> {
+ let ParserMatchClass = SWaitMatchClass;
+ let PrintMethod = "printWaitFlag";
+}
+
include "SIInstrFormats.td"
include "VIInstrFormats.td"
@@ -492,13 +519,6 @@ class NamedOperandU32<string Name, AsmOperandClass MatchClass> : Operand<i32> {
let ParserMatchClass = MatchClass;
}
-def SendMsgMatchClass : AsmOperandClass {
- let Name = "SendMsg";
- let PredicateMethod = "isSendMsg";
- let ParserMethod = "parseSendMsgOp";
- let RenderMethod = "addImmOperands";
-}
-
let OperandType = "OPERAND_IMMEDIATE" in {
def offen : NamedOperandBit<"Offen", NamedMatchClass<"Offen">>;
diff --git a/llvm/lib/Target/AMDGPU/SIInstructions.td b/llvm/lib/Target/AMDGPU/SIInstructions.td
index f369ab5f034..2c66e9aa6e7 100644
--- a/llvm/lib/Target/AMDGPU/SIInstructions.td
+++ b/llvm/lib/Target/AMDGPU/SIInstructions.td
@@ -18,15 +18,6 @@ int P20 = 1;
}
def INTERP : InterpSlots;
-def InterpSlot : Operand<i32> {
- let PrintMethod = "printInterpSlot";
-}
-
-def SendMsgImm : Operand<i32> {
- let PrintMethod = "printSendMsg";
- let ParserMatchClass = SendMsgMatchClass;
-}
-
def isGCN : Predicate<"Subtarget->getGeneration() "
">= AMDGPUSubtarget::SOUTHERN_ISLANDS">,
AssemblerPredicate<"FeatureGCN">;
@@ -38,17 +29,6 @@ def isSI : Predicate<"Subtarget->getGeneration() "
def has16BankLDS : Predicate<"Subtarget->getLDSBankCount() == 16">;
def has32BankLDS : Predicate<"Subtarget->getLDSBankCount() == 32">;
-def SWaitMatchClass : AsmOperandClass {
- let Name = "SWaitCnt";
- let RenderMethod = "addImmOperands";
- let ParserMethod = "parseSWaitCntOps";
-}
-
-def WAIT_FLAG : Operand <i32> {
- let ParserMatchClass = SWaitMatchClass;
- let PrintMethod = "printWaitFlag";
-}
-
let SubtargetPredicate = isGCN in {
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud