2015-11-09 12:07:48 +08:00
|
|
|
//===- HexagonImmediates.td - Hexagon immediate processing -*- tablegen -*-===//
|
2011-12-13 05:14:40 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illnois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def s32_0ImmOperand : AsmOperandClass { let Name = "s32_0Imm"; }
|
2016-02-17 04:38:17 +08:00
|
|
|
def s23_2ImmOperand : AsmOperandClass { let Name = "s23_2Imm"; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def s8_0ImmOperand : AsmOperandClass { let Name = "s8_0Imm"; }
|
|
|
|
def s8_0Imm64Operand : AsmOperandClass { let Name = "s8_0Imm64"; }
|
|
|
|
def s6_0ImmOperand : AsmOperandClass { let Name = "s6_0Imm"; }
|
2015-06-11 00:52:32 +08:00
|
|
|
def s4_0ImmOperand : AsmOperandClass { let Name = "s4_0Imm"; }
|
|
|
|
def s4_1ImmOperand : AsmOperandClass { let Name = "s4_1Imm"; }
|
|
|
|
def s4_2ImmOperand : AsmOperandClass { let Name = "s4_2Imm"; }
|
|
|
|
def s4_3ImmOperand : AsmOperandClass { let Name = "s4_3Imm"; }
|
2015-10-17 09:33:04 +08:00
|
|
|
def s4_6ImmOperand : AsmOperandClass { let Name = "s4_6Imm"; }
|
|
|
|
def s3_6ImmOperand : AsmOperandClass { let Name = "s3_6Imm"; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def u64_0ImmOperand : AsmOperandClass { let Name = "u64_0Imm"; }
|
|
|
|
def u32_0ImmOperand : AsmOperandClass { let Name = "u32_0Imm"; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def u26_6ImmOperand : AsmOperandClass { let Name = "u26_6Imm"; }
|
|
|
|
def u16_0ImmOperand : AsmOperandClass { let Name = "u16_0Imm"; }
|
|
|
|
def u16_1ImmOperand : AsmOperandClass { let Name = "u16_1Imm"; }
|
|
|
|
def u16_2ImmOperand : AsmOperandClass { let Name = "u16_2Imm"; }
|
|
|
|
def u16_3ImmOperand : AsmOperandClass { let Name = "u16_3Imm"; }
|
|
|
|
def u11_3ImmOperand : AsmOperandClass { let Name = "u11_3Imm"; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def u10_0ImmOperand : AsmOperandClass { let Name = "u10_0Imm"; }
|
|
|
|
def u9_0ImmOperand : AsmOperandClass { let Name = "u9_0Imm"; }
|
|
|
|
def u8_0ImmOperand : AsmOperandClass { let Name = "u8_0Imm"; }
|
|
|
|
def u7_0ImmOperand : AsmOperandClass { let Name = "u7_0Imm"; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def u6_0ImmOperand : AsmOperandClass { let Name = "u6_0Imm"; }
|
|
|
|
def u6_1ImmOperand : AsmOperandClass { let Name = "u6_1Imm"; }
|
|
|
|
def u6_2ImmOperand : AsmOperandClass { let Name = "u6_2Imm"; }
|
|
|
|
def u6_3ImmOperand : AsmOperandClass { let Name = "u6_3Imm"; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def u5_0ImmOperand : AsmOperandClass { let Name = "u5_0Imm"; }
|
|
|
|
def u4_0ImmOperand : AsmOperandClass { let Name = "u4_0Imm"; }
|
|
|
|
def u3_0ImmOperand : AsmOperandClass { let Name = "u3_0Imm"; }
|
|
|
|
def u2_0ImmOperand : AsmOperandClass { let Name = "u2_0Imm"; }
|
|
|
|
def u1_0ImmOperand : AsmOperandClass { let Name = "u1_0Imm"; }
|
|
|
|
def n8_0ImmOperand : AsmOperandClass { let Name = "n8_0Imm"; }
|
2012-11-22 03:53:42 +08:00
|
|
|
// Immediate operands.
|
|
|
|
|
2015-11-09 12:07:48 +08:00
|
|
|
let OperandType = "OPERAND_IMMEDIATE",
|
|
|
|
DecoderMethod = "unsignedImmDecoder" in {
|
2016-11-02 03:02:10 +08:00
|
|
|
def s32_0Imm : Operand<i32> { let ParserMatchClass = s32_0ImmOperand;
|
|
|
|
let DecoderMethod = "s32_0ImmDecoder"; }
|
2016-02-17 04:38:17 +08:00
|
|
|
def s23_2Imm : Operand<i32> { let ParserMatchClass = s23_2ImmOperand; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def s8_0Imm : Operand<i32> { let ParserMatchClass = s8_0ImmOperand;
|
|
|
|
let DecoderMethod = "s8_0ImmDecoder"; }
|
|
|
|
def s8_0Imm64 : Operand<i64> { let ParserMatchClass = s8_0Imm64Operand;
|
|
|
|
let DecoderMethod = "s8_0ImmDecoder"; }
|
|
|
|
def s6_0Imm : Operand<i32> { let ParserMatchClass = s6_0ImmOperand;
|
2015-11-09 12:07:48 +08:00
|
|
|
let DecoderMethod = "s6_0ImmDecoder"; }
|
2015-06-06 00:00:11 +08:00
|
|
|
def s6_3Imm : Operand<i32>;
|
2015-11-09 12:07:48 +08:00
|
|
|
def s4_0Imm : Operand<i32> { let ParserMatchClass = s4_0ImmOperand;
|
|
|
|
let DecoderMethod = "s4_0ImmDecoder"; }
|
|
|
|
def s4_1Imm : Operand<i32> { let ParserMatchClass = s4_1ImmOperand;
|
|
|
|
let DecoderMethod = "s4_1ImmDecoder"; }
|
|
|
|
def s4_2Imm : Operand<i32> { let ParserMatchClass = s4_2ImmOperand;
|
|
|
|
let DecoderMethod = "s4_2ImmDecoder"; }
|
|
|
|
def s4_3Imm : Operand<i32> { let ParserMatchClass = s4_3ImmOperand;
|
|
|
|
let DecoderMethod = "s4_3ImmDecoder"; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def u64_0Imm : Operand<i64> { let ParserMatchClass = u64_0ImmOperand; }
|
|
|
|
def u32_0Imm : Operand<i32> { let ParserMatchClass = u32_0ImmOperand; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def u26_6Imm : Operand<i32> { let ParserMatchClass = u26_6ImmOperand; }
|
|
|
|
def u16_0Imm : Operand<i32> { let ParserMatchClass = u16_0ImmOperand; }
|
|
|
|
def u16_1Imm : Operand<i32> { let ParserMatchClass = u16_1ImmOperand; }
|
|
|
|
def u16_2Imm : Operand<i32> { let ParserMatchClass = u16_2ImmOperand; }
|
|
|
|
def u16_3Imm : Operand<i32> { let ParserMatchClass = u16_3ImmOperand; }
|
|
|
|
def u11_3Imm : Operand<i32> { let ParserMatchClass = u11_3ImmOperand; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def u10_0Imm : Operand<i32> { let ParserMatchClass = u10_0ImmOperand; }
|
|
|
|
def u9_0Imm : Operand<i32> { let ParserMatchClass = u9_0ImmOperand; }
|
|
|
|
def u8_0Imm : Operand<i32> { let ParserMatchClass = u8_0ImmOperand; }
|
|
|
|
def u7_0Imm : Operand<i32> { let ParserMatchClass = u7_0ImmOperand; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def u6_0Imm : Operand<i32> { let ParserMatchClass = u6_0ImmOperand; }
|
|
|
|
def u6_1Imm : Operand<i32> { let ParserMatchClass = u6_1ImmOperand; }
|
|
|
|
def u6_2Imm : Operand<i32> { let ParserMatchClass = u6_2ImmOperand; }
|
|
|
|
def u6_3Imm : Operand<i32> { let ParserMatchClass = u6_3ImmOperand; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def u5_0Imm : Operand<i32> { let ParserMatchClass = u5_0ImmOperand; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def u5_1Imm : Operand<i32>;
|
2015-06-06 00:00:11 +08:00
|
|
|
def u5_2Imm : Operand<i32>;
|
|
|
|
def u5_3Imm : Operand<i32>;
|
2016-11-02 03:02:10 +08:00
|
|
|
def u4_0Imm : Operand<i32> { let ParserMatchClass = u4_0ImmOperand; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def u4_1Imm : Operand<i32>;
|
2015-06-06 00:00:11 +08:00
|
|
|
def u4_2Imm : Operand<i32>;
|
2015-11-09 12:07:48 +08:00
|
|
|
def u4_3Imm : Operand<i32>;
|
2016-11-02 03:02:10 +08:00
|
|
|
def u3_0Imm : Operand<i32> { let ParserMatchClass = u3_0ImmOperand; }
|
2015-06-06 00:00:11 +08:00
|
|
|
def u3_1Imm : Operand<i32>;
|
2015-11-09 12:07:48 +08:00
|
|
|
def u3_2Imm : Operand<i32>;
|
|
|
|
def u3_3Imm : Operand<i32>;
|
2016-11-02 03:02:10 +08:00
|
|
|
def u2_0Imm : Operand<i32> { let ParserMatchClass = u2_0ImmOperand; }
|
|
|
|
def u1_0Imm : Operand<i32> { let ParserMatchClass = u1_0ImmOperand; }
|
|
|
|
def n8_0Imm : Operand<i32> { let ParserMatchClass = n8_0ImmOperand; }
|
2012-11-22 03:53:42 +08:00
|
|
|
}
|
|
|
|
|
2015-10-17 09:33:04 +08:00
|
|
|
let OperandType = "OPERAND_IMMEDIATE" in {
|
|
|
|
def s4_6Imm : Operand<i32> { let ParserMatchClass = s4_6ImmOperand;
|
|
|
|
let PrintMethod = "prints4_6ImmOperand";
|
|
|
|
let DecoderMethod = "s4_6ImmDecoder";}
|
|
|
|
def s4_7Imm : Operand<i32> { let PrintMethod = "prints4_7ImmOperand";
|
|
|
|
let DecoderMethod = "s4_6ImmDecoder";}
|
|
|
|
def s3_6Imm : Operand<i32> { let ParserMatchClass = s3_6ImmOperand;
|
|
|
|
let PrintMethod = "prints3_6ImmOperand";
|
|
|
|
let DecoderMethod = "s3_6ImmDecoder";}
|
|
|
|
def s3_7Imm : Operand<i32> { let PrintMethod = "prints3_7ImmOperand";
|
|
|
|
let DecoderMethod = "s3_6ImmDecoder";}
|
|
|
|
}
|
2016-12-05 12:29:00 +08:00
|
|
|
def n1ConstOperand : AsmOperandClass { let Name = "n1Const"; }
|
|
|
|
def n1Const : Operand<i32> { let ParserMatchClass = n1ConstOperand; }
|
2015-10-17 09:33:04 +08:00
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
//
|
|
|
|
// Immediate predicates
|
|
|
|
//
|
2015-03-12 08:19:59 +08:00
|
|
|
def s32_0ImmPred : PatLeaf<(i32 imm), [{
|
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isInt<32>(v);
|
|
|
|
}]>;
|
|
|
|
|
|
|
|
def s31_1ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
2015-03-12 08:19:59 +08:00
|
|
|
return isShiftedInt<31,1>(v);
|
2011-12-13 05:14:40 +08:00
|
|
|
}]>;
|
|
|
|
|
2015-03-12 08:19:59 +08:00
|
|
|
def s30_2ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
2015-10-21 03:04:53 +08:00
|
|
|
return isShiftedInt<30,2>(v);
|
2015-03-12 08:19:59 +08:00
|
|
|
}]>;
|
|
|
|
|
|
|
|
def s29_3ImmPred : PatLeaf<(i32 imm), [{
|
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
2015-10-21 03:04:53 +08:00
|
|
|
return isShiftedInt<29,3>(v);
|
2012-11-22 04:05:09 +08:00
|
|
|
}]>;
|
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def s10_0ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isInt<10>(v);
|
|
|
|
}]>;
|
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def s8_0ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isInt<8>(v);
|
|
|
|
}]>;
|
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def s8_0Imm64Pred : PatLeaf<(i64 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isInt<8>(v);
|
|
|
|
}]>;
|
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def s6_0ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isInt<6>(v);
|
|
|
|
}]>;
|
|
|
|
|
|
|
|
def s4_0ImmPred : PatLeaf<(i32 imm), [{
|
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isInt<4>(v);
|
|
|
|
}]>;
|
|
|
|
|
|
|
|
def s4_1ImmPred : PatLeaf<(i32 imm), [{
|
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isShiftedInt<4,1>(v);
|
|
|
|
}]>;
|
|
|
|
|
|
|
|
def s4_2ImmPred : PatLeaf<(i32 imm), [{
|
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isShiftedInt<4,2>(v);
|
|
|
|
}]>;
|
|
|
|
|
|
|
|
def s4_3ImmPred : PatLeaf<(i32 imm), [{
|
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isShiftedInt<4,3>(v);
|
|
|
|
}]>;
|
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def u32_0ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isUInt<32>(v);
|
|
|
|
}]>;
|
|
|
|
|
2015-10-21 03:04:53 +08:00
|
|
|
def u16_0ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isUInt<16>(v);
|
|
|
|
}]>;
|
|
|
|
|
2015-01-07 03:03:20 +08:00
|
|
|
def u11_3ImmPred : PatLeaf<(i32 imm), [{
|
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isShiftedUInt<11,3>(v);
|
|
|
|
}]>;
|
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def u9_0ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isUInt<9>(v);
|
|
|
|
}]>;
|
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def u8_0ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isUInt<8>(v);
|
|
|
|
}]>;
|
|
|
|
|
|
|
|
def u6_0ImmPred : PatLeaf<(i32 imm), [{
|
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isUInt<6>(v);
|
|
|
|
}]>;
|
|
|
|
|
|
|
|
def u6_1ImmPred : PatLeaf<(i32 imm), [{
|
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isShiftedUInt<6,1>(v);
|
|
|
|
}]>;
|
|
|
|
|
|
|
|
def u6_2ImmPred : PatLeaf<(i32 imm), [{
|
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isShiftedUInt<6,2>(v);
|
|
|
|
}]>;
|
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def u5_0ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isUInt<5>(v);
|
|
|
|
}]>;
|
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def u4_0ImmPred : PatLeaf<(i32 imm), [{
|
2015-01-29 02:29:11 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isUInt<4>(v);
|
|
|
|
}]>;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def u3_0ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isUInt<3>(v);
|
|
|
|
}]>;
|
|
|
|
|
2016-11-02 03:02:10 +08:00
|
|
|
def u2_0ImmPred : PatLeaf<(i32 imm), [{
|
2011-12-13 05:14:40 +08:00
|
|
|
int64_t v = (int64_t)N->getSExtValue();
|
|
|
|
return isUInt<2>(v);
|
|
|
|
}]>;
|
|
|
|
|
2012-11-29 04:58:14 +08:00
|
|
|
// Extendable immediate operands.
|
2015-11-09 12:07:48 +08:00
|
|
|
def f32ExtOperand : AsmOperandClass { let Name = "f32Ext"; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def s16_0ExtOperand : AsmOperandClass { let Name = "s16_0Ext"; }
|
|
|
|
def s12_0ExtOperand : AsmOperandClass { let Name = "s12_0Ext"; }
|
|
|
|
def s10_0ExtOperand : AsmOperandClass { let Name = "s10_0Ext"; }
|
|
|
|
def s9_0ExtOperand : AsmOperandClass { let Name = "s9_0Ext"; }
|
|
|
|
def s8_0ExtOperand : AsmOperandClass { let Name = "s8_0Ext"; }
|
|
|
|
def s7_0ExtOperand : AsmOperandClass { let Name = "s7_0Ext"; }
|
|
|
|
def s6_0ExtOperand : AsmOperandClass { let Name = "s6_0Ext"; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def s11_0ExtOperand : AsmOperandClass { let Name = "s11_0Ext"; }
|
|
|
|
def s11_1ExtOperand : AsmOperandClass { let Name = "s11_1Ext"; }
|
|
|
|
def s11_2ExtOperand : AsmOperandClass { let Name = "s11_2Ext"; }
|
|
|
|
def s11_3ExtOperand : AsmOperandClass { let Name = "s11_3Ext"; }
|
|
|
|
def u6_0ExtOperand : AsmOperandClass { let Name = "u6_0Ext"; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def u7_0ExtOperand : AsmOperandClass { let Name = "u7_0Ext"; }
|
|
|
|
def u8_0ExtOperand : AsmOperandClass { let Name = "u8_0Ext"; }
|
|
|
|
def u9_0ExtOperand : AsmOperandClass { let Name = "u9_0Ext"; }
|
|
|
|
def u10_0ExtOperand : AsmOperandClass { let Name = "u10_0Ext"; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def u6_1ExtOperand : AsmOperandClass { let Name = "u6_1Ext"; }
|
|
|
|
def u6_2ExtOperand : AsmOperandClass { let Name = "u6_2Ext"; }
|
|
|
|
def u6_3ExtOperand : AsmOperandClass { let Name = "u6_3Ext"; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def u32_0MustExtOperand : AsmOperandClass { let Name = "u32_0MustExt"; }
|
2015-11-09 12:07:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let OperandType = "OPERAND_IMMEDIATE", PrintMethod = "printExtOperand",
|
|
|
|
DecoderMethod = "unsignedImmDecoder" in {
|
|
|
|
def f32Ext : Operand<f32> { let ParserMatchClass = f32ExtOperand; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def s16_0Ext : Operand<i32> { let ParserMatchClass = s16_0ExtOperand;
|
|
|
|
let DecoderMethod = "s16_0ImmDecoder"; }
|
|
|
|
def s12_0Ext : Operand<i32> { let ParserMatchClass = s12_0ExtOperand;
|
|
|
|
let DecoderMethod = "s12_0ImmDecoder"; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def s11_0Ext : Operand<i32> { let ParserMatchClass = s11_0ExtOperand;
|
2016-11-02 03:02:10 +08:00
|
|
|
let DecoderMethod = "s11_0ImmDecoder"; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def s11_1Ext : Operand<i32> { let ParserMatchClass = s11_1ExtOperand;
|
2016-11-02 03:02:10 +08:00
|
|
|
let DecoderMethod = "s11_1ImmDecoder"; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def s11_2Ext : Operand<i32> { let ParserMatchClass = s11_2ExtOperand;
|
2016-11-02 03:02:10 +08:00
|
|
|
let DecoderMethod = "s11_2ImmDecoder"; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def s11_3Ext : Operand<i32> { let ParserMatchClass = s11_3ExtOperand;
|
2016-11-02 03:02:10 +08:00
|
|
|
let DecoderMethod = "s11_3ImmDecoder"; }
|
|
|
|
def s10_0Ext : Operand<i32> { let ParserMatchClass = s10_0ExtOperand;
|
|
|
|
let DecoderMethod = "s10_0ImmDecoder"; }
|
|
|
|
def s9_0Ext : Operand<i32> { let ParserMatchClass = s9_0ExtOperand;
|
|
|
|
let DecoderMethod = "s9_0ImmDecoder"; }
|
|
|
|
def s8_0Ext : Operand<i32> { let ParserMatchClass = s8_0ExtOperand;
|
|
|
|
let DecoderMethod = "s8_0ImmDecoder"; }
|
|
|
|
def s7_0Ext : Operand<i32> { let ParserMatchClass = s7_0ExtOperand; }
|
|
|
|
def s6_0Ext : Operand<i32> { let ParserMatchClass = s6_0ExtOperand;
|
|
|
|
let DecoderMethod = "s6_0ImmDecoder"; }
|
|
|
|
def u7_0Ext : Operand<i32> { let ParserMatchClass = u7_0ExtOperand; }
|
|
|
|
def u8_0Ext : Operand<i32> { let ParserMatchClass = u8_0ExtOperand; }
|
|
|
|
def u9_0Ext : Operand<i32> { let ParserMatchClass = u9_0ExtOperand; }
|
|
|
|
def u10_0Ext : Operand<i32> { let ParserMatchClass = u10_0ExtOperand; }
|
2015-11-09 12:07:48 +08:00
|
|
|
def u6_0Ext : Operand<i32> { let ParserMatchClass = u6_0ExtOperand; }
|
|
|
|
def u6_1Ext : Operand<i32> { let ParserMatchClass = u6_1ExtOperand; }
|
|
|
|
def u6_2Ext : Operand<i32> { let ParserMatchClass = u6_2ExtOperand; }
|
|
|
|
def u6_3Ext : Operand<i32> { let ParserMatchClass = u6_3ExtOperand; }
|
2016-11-02 03:02:10 +08:00
|
|
|
def u32_0MustExt : Operand<i32> { let ParserMatchClass = u32_0MustExtOperand; }
|
2012-11-29 04:58:14 +08:00
|
|
|
}
|
|
|
|
|
2014-12-23 05:20:03 +08:00
|
|
|
|
|
|
|
// This complex pattern exists only to create a machine instruction operand
|
|
|
|
// of type "frame index". There doesn't seem to be a way to do that directly
|
|
|
|
// in the patterns.
|
|
|
|
def AddrFI : ComplexPattern<i32, 1, "SelectAddrFI", [frameindex], []>;
|
|
|
|
|
2015-02-05 04:38:01 +08:00
|
|
|
// These complex patterns are not strictly necessary, since global address
|
|
|
|
// folding will happen during DAG combining. For distinguishing between GA
|
|
|
|
// and GP, pat frags with HexagonCONST32 and HexagonCONST32_GP can be used.
|
|
|
|
def AddrGA : ComplexPattern<i32, 1, "SelectAddrGA", [], []>;
|
2015-02-05 06:36:28 +08:00
|
|
|
def AddrGP : ComplexPattern<i32, 1, "SelectAddrGP", [], []>;
|
2015-02-05 04:38:01 +08:00
|
|
|
|
2012-12-04 13:00:31 +08:00
|
|
|
// Address operands.
|
|
|
|
|
|
|
|
let PrintMethod = "printGlobalOperand" in {
|
|
|
|
def globaladdress : Operand<i32>;
|
|
|
|
def globaladdressExt : Operand<i32>;
|
|
|
|
}
|
|
|
|
|
|
|
|
let PrintMethod = "printJumpTable" in
|
|
|
|
def jumptablebase : Operand<i32>;
|
|
|
|
|
2015-11-09 12:07:48 +08:00
|
|
|
def brtarget : Operand<OtherVT> {
|
|
|
|
let DecoderMethod = "brtargetDecoder";
|
|
|
|
let PrintMethod = "printBrtarget";
|
|
|
|
}
|
2015-04-27 22:16:43 +08:00
|
|
|
def brtargetExt : Operand<OtherVT> {
|
2015-11-09 12:07:48 +08:00
|
|
|
let DecoderMethod = "brtargetDecoder";
|
|
|
|
let PrintMethod = "printBrtarget";
|
|
|
|
}
|
|
|
|
def calltarget : Operand<i32> {
|
|
|
|
let DecoderMethod = "brtargetDecoder";
|
|
|
|
let PrintMethod = "printBrtarget";
|
2015-04-27 22:16:43 +08:00
|
|
|
}
|
2012-12-04 13:00:31 +08:00
|
|
|
|
|
|
|
def bblabel : Operand<i32>;
|
2015-11-09 12:07:48 +08:00
|
|
|
def bbl : SDNode<"ISD::BasicBlock", SDTPtrLeaf, [], "BasicBlockSDNode">;
|