From ccd944029e71a1fae9d51a37eb6cc2ac1b5dad79 Mon Sep 17 00:00:00 2001 From: Jyotsna Verma Date: Wed, 21 Nov 2012 19:53:42 +0000 Subject: [PATCH] Use one common 'let' expression to set PrintMethod for all immediate operands. llvm-svn: 168449 --- lib/Target/Hexagon/HexagonOperands.td | 258 +++++--------------------- 1 file changed, 51 insertions(+), 207 deletions(-) diff --git a/lib/Target/Hexagon/HexagonOperands.td b/lib/Target/Hexagon/HexagonOperands.td index e8ee091cd3d..48b65463fab 100644 --- a/lib/Target/Hexagon/HexagonOperands.td +++ b/lib/Target/Hexagon/HexagonOperands.td @@ -7,215 +7,59 @@ // //===----------------------------------------------------------------------===// -// From IA64's InstrInfo file -def s32Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; +// Immediate operands. + +let PrintMethod = "printImmOperand" in { + // f32Ext type is used to identify constant extended floating point immediates. + def f32Ext : Operand; + def s32Imm : Operand; + def s26_6Imm : Operand; + def s16Imm : Operand; + def s12Imm : Operand; + def s11Imm : Operand; + def s11_0Imm : Operand; + def s11_1Imm : Operand; + def s11_2Imm : Operand; + def s11_3Imm : Operand; + def s10Imm : Operand; + def s9Imm : Operand; + def m9Imm : Operand; + def s8Imm : Operand; + def s8Imm64 : Operand; + def s6Imm : Operand; + def s4Imm : Operand; + def s4_0Imm : Operand; + def s4_1Imm : Operand; + def s4_2Imm : Operand; + def s4_3Imm : Operand; + def u64Imm : Operand; + def u32Imm : Operand; + def u26_6Imm : Operand; + def u16Imm : Operand; + def u16_0Imm : Operand; + def u16_1Imm : Operand; + def u16_2Imm : Operand; + def u11_3Imm : Operand; + def u10Imm : Operand; + def u9Imm : Operand; + def u8Imm : Operand; + def u7Imm : Operand; + def u6Imm : Operand; + def u6_0Imm : Operand; + def u6_1Imm : Operand; + def u6_2Imm : Operand; + def u6_3Imm : Operand; + def u5Imm : Operand; + def u4Imm : Operand; + def u3Imm : Operand; + def u2Imm : Operand; + def u1Imm : Operand; + def n8Imm : Operand; + def m6Imm : Operand; } -def s16Imm : Operand { - let PrintMethod = "printImmOperand"; -} - -def s12Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s11Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s11_0Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s11_1Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s11_2Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s11_3Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s10Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s9Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s8Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s8Imm64 : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s6Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s4Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s4_0Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s4_1Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s4_2Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def s4_3Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u64Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u32Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u16Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u16_0Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u16_1Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u16_2Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u11_3Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u10Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u9Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u8Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u7Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u6Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u6_0Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u6_1Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u6_2Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u6_3Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u5Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u4Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u3Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u2Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def u1Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def n8Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def m6Imm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printImmOperand"; -} - -def nOneImm : Operand { - // For now, we use a generic print function for all operands. - let PrintMethod = "printNOneImmOperand"; -} +let PrintMethod = "printNOneImmOperand" in +def nOneImm : Operand; // // Immediate predicates