Index: lib/Target/AMDGPU/SIInstrInfo.td =================================================================== --- lib/Target/AMDGPU/SIInstrInfo.td +++ lib/Target/AMDGPU/SIInstrInfo.td @@ -458,6 +458,33 @@ def const_ga : Operand; +def InterpSlot : Operand { + let PrintMethod = "printInterpSlot"; +} + +def SendMsgMatchClass : AsmOperandClass { + let Name = "SendMsg"; + let PredicateMethod = "isSendMsg"; + let ParserMethod = "parseSendMsgOp"; + let RenderMethod = "addImmOperands"; +} + +def SendMsgImm : Operand { + let PrintMethod = "printSendMsg"; + let ParserMatchClass = SendMsgMatchClass; +} + +def SWaitMatchClass : AsmOperandClass { + let Name = "SWaitCnt"; + let RenderMethod = "addImmOperands"; + let ParserMethod = "parseSWaitCntOps"; +} + +def WAIT_FLAG : Operand { + let ParserMatchClass = SWaitMatchClass; + let PrintMethod = "printWaitFlag"; +} + include "SIInstrFormats.td" include "VIInstrFormats.td" @@ -491,13 +518,6 @@ 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">>; Index: lib/Target/AMDGPU/SIInstructions.td =================================================================== --- lib/Target/AMDGPU/SIInstructions.td +++ lib/Target/AMDGPU/SIInstructions.td @@ -18,15 +18,6 @@ } def INTERP : InterpSlots; -def InterpSlot : Operand { - let PrintMethod = "printInterpSlot"; -} - -def SendMsgImm : Operand { - let PrintMethod = "printSendMsg"; - let ParserMatchClass = SendMsgMatchClass; -} - def isGCN : Predicate<"Subtarget->getGeneration() " ">= AMDGPUSubtarget::SOUTHERN_ISLANDS">, AssemblerPredicate<"FeatureGCN">; @@ -34,21 +25,9 @@ "== AMDGPUSubtarget::SOUTHERN_ISLANDS">, AssemblerPredicate<"FeatureSouthernIslands">; - 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 { - let ParserMatchClass = SWaitMatchClass; - let PrintMethod = "printWaitFlag"; -} - let SubtargetPredicate = isGCN in { //===----------------------------------------------------------------------===//