2011-12-13 05:14:40 +08:00
|
|
|
//==- HexagonInstrFormats.td - Hexagon Instruction Formats --*- tablegen -*-==//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2012-11-15 04:38:48 +08:00
|
|
|
// Addressing modes for load/store instructions
|
2013-02-15 03:57:17 +08:00
|
|
|
class AddrModeType<bits<3> value> {
|
|
|
|
bits<3> Value = value;
|
2012-11-15 04:38:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
def NoAddrMode : AddrModeType<0>; // No addressing mode
|
|
|
|
def Absolute : AddrModeType<1>; // Absolute addressing mode
|
|
|
|
def AbsoluteSet : AddrModeType<2>; // Absolute set addressing mode
|
|
|
|
def BaseImmOffset : AddrModeType<3>; // Indirect with offset
|
|
|
|
def BaseLongOffset : AddrModeType<4>; // Indirect with long offset
|
|
|
|
def BaseRegOffset : AddrModeType<5>; // Indirect with register offset
|
2013-05-07 23:06:29 +08:00
|
|
|
def PostInc : AddrModeType<6>; // Post increment addressing mode
|
2012-11-15 04:38:48 +08:00
|
|
|
|
2015-02-10 05:07:35 +08:00
|
|
|
class MemAccessSize<bits<4> value> {
|
|
|
|
bits<4> Value = value;
|
2013-02-15 03:57:17 +08:00
|
|
|
}
|
|
|
|
|
2017-02-10 23:33:13 +08:00
|
|
|
// MemAccessSize is represented as 1+log2(N) where N is size in bits.
|
2016-11-18 03:21:20 +08:00
|
|
|
def NoMemAccess : MemAccessSize<0>;// Not a memory access instruction.
|
2013-02-15 03:57:17 +08:00
|
|
|
def ByteAccess : MemAccessSize<1>;// Byte access instruction (memb).
|
|
|
|
def HalfWordAccess : MemAccessSize<2>;// Half word access instruction (memh).
|
2013-09-28 21:42:22 +08:00
|
|
|
def WordAccess : MemAccessSize<3>;// Word access instruction (memw).
|
2013-02-15 03:57:17 +08:00
|
|
|
def DoubleWordAccess : MemAccessSize<4>;// Double word access instruction (memd)
|
2015-10-17 09:33:04 +08:00
|
|
|
def Vector64Access : MemAccessSize<7>;// Vector access instruction (memv)
|
|
|
|
def Vector128Access : MemAccessSize<8>;// Vector access instruction (memv)
|
2013-02-15 03:57:17 +08:00
|
|
|
|
|
|
|
|
2012-02-18 20:03:15 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2014-05-08 03:07:34 +08:00
|
|
|
// Instruction Class Declaration +
|
2012-02-18 20:03:15 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2012-02-09 02:25:47 +08:00
|
|
|
|
2013-02-15 03:57:17 +08:00
|
|
|
class OpcodeHexagon {
|
|
|
|
field bits<32> Inst = ?; // Default to an invalid insn.
|
|
|
|
bits<4> IClass = 0; // ICLASS
|
2017-02-10 23:33:13 +08:00
|
|
|
bits<1> zero = 0;
|
2013-02-15 03:57:17 +08:00
|
|
|
|
|
|
|
let Inst{31-28} = IClass;
|
|
|
|
}
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2013-02-15 03:57:17 +08:00
|
|
|
class InstHexagon<dag outs, dag ins, string asmstr, list<dag> pattern,
|
|
|
|
string cstr, InstrItinClass itin, IType type>
|
2015-03-11 04:56:22 +08:00
|
|
|
: Instruction {
|
2011-12-13 05:14:40 +08:00
|
|
|
let Namespace = "Hexagon";
|
|
|
|
|
|
|
|
dag OutOperandList = outs;
|
|
|
|
dag InOperandList = ins;
|
2012-05-04 00:18:50 +08:00
|
|
|
let AsmString = asmstr;
|
2011-12-13 05:14:40 +08:00
|
|
|
let Pattern = pattern;
|
|
|
|
let Constraints = cstr;
|
2015-03-11 04:56:22 +08:00
|
|
|
let Itinerary = itin;
|
|
|
|
let Size = 4;
|
|
|
|
|
|
|
|
// SoftFail is a field the disassembler can use to provide a way for
|
|
|
|
// instructions to not match without killing the whole decode process. It is
|
|
|
|
// mainly used for ARM, but Tablegen expects this field to exist or it fails
|
|
|
|
// to build the decode table.
|
|
|
|
field bits<32> SoftFail = 0;
|
|
|
|
|
|
|
|
// *** Must match MCTargetDesc/HexagonBaseInfo.h ***
|
|
|
|
|
|
|
|
// Instruction type according to the ISA.
|
2013-02-15 03:57:17 +08:00
|
|
|
IType Type = type;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{5-0} = Type.Value;
|
2013-02-15 03:57:17 +08:00
|
|
|
|
2012-05-04 00:18:50 +08:00
|
|
|
// Solo instructions, i.e., those that cannot be in a packet with others.
|
2013-02-15 03:57:17 +08:00
|
|
|
bits<1> isSolo = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{6} = isSolo;
|
2014-05-08 03:07:34 +08:00
|
|
|
// Packed only with A or X-type instructions.
|
|
|
|
bits<1> isSoloAX = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{7} = isSoloAX;
|
2014-05-08 03:07:34 +08:00
|
|
|
// Only A-type instruction in first slot or nothing.
|
|
|
|
bits<1> isSoloAin1 = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{8} = isSoloAin1;
|
2013-02-15 03:57:17 +08:00
|
|
|
|
2012-02-09 02:25:47 +08:00
|
|
|
// Predicated instructions.
|
|
|
|
bits<1> isPredicated = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{9} = isPredicated;
|
2013-02-15 03:57:17 +08:00
|
|
|
bits<1> isPredicatedFalse = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{10} = isPredicatedFalse;
|
2012-11-15 04:38:48 +08:00
|
|
|
bits<1> isPredicatedNew = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{11} = isPredicatedNew;
|
2014-05-08 03:07:34 +08:00
|
|
|
bits<1> isPredicateLate = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{12} = isPredicateLate; // Late predicate producer insn.
|
2013-02-15 03:57:17 +08:00
|
|
|
|
|
|
|
// New-value insn helper fields.
|
|
|
|
bits<1> isNewValue = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{13} = isNewValue; // New-value consumer insn.
|
2013-02-15 03:57:17 +08:00
|
|
|
bits<1> hasNewValue = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{14} = hasNewValue; // New-value producer insn.
|
2013-02-15 03:57:17 +08:00
|
|
|
bits<3> opNewValue = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{17-15} = opNewValue; // New-value produced operand.
|
2012-11-15 04:38:48 +08:00
|
|
|
bits<1> isNVStorable = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{18} = isNVStorable; // Store that can become new-value store.
|
2012-11-02 03:13:23 +08:00
|
|
|
bits<1> isNVStore = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{19} = isNVStore; // New-value store insn.
|
2014-05-08 03:07:34 +08:00
|
|
|
bits<1> isCVLoadable = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{20} = isCVLoadable; // Load that can become cur-value load.
|
2014-05-08 03:07:34 +08:00
|
|
|
bits<1> isCVLoad = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{21} = isCVLoad; // Cur-value load insn.
|
2012-11-15 04:38:48 +08:00
|
|
|
|
|
|
|
// Immediate extender helper fields.
|
|
|
|
bits<1> isExtendable = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{22} = isExtendable; // Insn may be extended.
|
2012-11-15 04:38:48 +08:00
|
|
|
bits<1> isExtended = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{23} = isExtended; // Insn must be extended.
|
2012-11-15 04:38:48 +08:00
|
|
|
bits<3> opExtendable = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{26-24} = opExtendable; // Which operand may be extended.
|
2012-11-15 04:38:48 +08:00
|
|
|
bits<1> isExtentSigned = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{27} = isExtentSigned; // Signed or unsigned range.
|
2012-11-15 04:38:48 +08:00
|
|
|
bits<5> opExtentBits = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{32-28} = opExtentBits; //Number of bits of range before extending.
|
2014-05-08 03:07:34 +08:00
|
|
|
bits<2> opExtentAlign = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{34-33} = opExtentAlign; // Alignment exponent before extending.
|
2012-11-15 04:38:48 +08:00
|
|
|
|
2013-02-15 03:57:17 +08:00
|
|
|
// Addressing mode for load/store instructions.
|
2012-11-15 04:38:48 +08:00
|
|
|
AddrModeType addrMode = NoAddrMode;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{43-41} = addrMode.Value;
|
2013-02-15 03:57:17 +08:00
|
|
|
|
|
|
|
// Memory access size for mem access instructions (load/store)
|
|
|
|
MemAccessSize accessSize = NoMemAccess;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{47-44} = accessSize.Value;
|
2014-05-08 03:07:34 +08:00
|
|
|
|
|
|
|
bits<1> isTaken = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags {48} = isTaken; // Branch prediction.
|
2014-05-08 03:07:34 +08:00
|
|
|
|
|
|
|
bits<1> isFP = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags {49} = isFP; // Floating-point.
|
2012-11-02 03:13:23 +08:00
|
|
|
|
2015-10-17 09:33:04 +08:00
|
|
|
bits<1> hasNewValue2 = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{51} = hasNewValue2; // Second New-value producer insn.
|
2015-10-17 09:33:04 +08:00
|
|
|
bits<3> opNewValue2 = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{54-52} = opNewValue2; // Second New-value produced operand.
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
bits<1> isAccumulator = 0;
|
2017-02-07 03:35:46 +08:00
|
|
|
let TSFlags{55} = isAccumulator;
|
2015-10-17 09:33:04 +08:00
|
|
|
|
2017-02-10 23:33:13 +08:00
|
|
|
bits<1> prefersSlot3 = 0;
|
|
|
|
let TSFlags{56} = prefersSlot3; // Complex XU
|
|
|
|
|
2016-10-09 01:18:51 +08:00
|
|
|
bit cofMax1 = 0;
|
|
|
|
let TSFlags{60} = cofMax1;
|
|
|
|
|
2017-05-02 04:16:35 +08:00
|
|
|
bit CVINew = 0;
|
|
|
|
let TSFlags{61} = CVINew;
|
|
|
|
|
2012-11-02 03:13:23 +08:00
|
|
|
// Fields used for relation models.
|
2015-10-17 09:33:04 +08:00
|
|
|
bit isNonTemporal = 0;
|
|
|
|
string isNT = ""; // set to "true" for non-temporal vector stores.
|
2012-11-02 03:13:23 +08:00
|
|
|
string BaseOpcode = "";
|
|
|
|
string CextOpcode = "";
|
|
|
|
string PredSense = "";
|
|
|
|
string PNewValue = "";
|
2013-05-11 04:27:34 +08:00
|
|
|
string NValueST = ""; // Set to "true" for new-value stores.
|
2012-11-02 03:13:23 +08:00
|
|
|
string InputType = ""; // Input is "imm" or "reg" type.
|
2012-11-15 04:38:48 +08:00
|
|
|
string isFloat = "false"; // Set to "true" for the floating-point load/store.
|
2014-12-11 05:24:10 +08:00
|
|
|
string isBrTaken = !if(isTaken, "true", "false"); // Set to "true"/"false" for jump instructions
|
2013-02-15 03:57:17 +08:00
|
|
|
|
|
|
|
let PredSense = !if(isPredicated, !if(isPredicatedFalse, "false", "true"),
|
|
|
|
"");
|
|
|
|
let PNewValue = !if(isPredicatedNew, "new", "");
|
2013-05-11 04:27:34 +08:00
|
|
|
let NValueST = !if(isNVStore, "true", "false");
|
2015-10-17 09:33:04 +08:00
|
|
|
let isNT = !if(isNonTemporal, "true", "false");
|
2012-11-15 04:38:48 +08:00
|
|
|
|
2017-02-07 03:35:46 +08:00
|
|
|
let hasSideEffects = 0;
|
2012-11-15 04:38:48 +08:00
|
|
|
// *** Must match MCTargetDesc/HexagonBaseInfo.h ***
|
2011-12-13 05:14:40 +08:00
|
|
|
}
|
|
|
|
|
2017-02-10 23:33:13 +08:00
|
|
|
class HInst<dag outs, dag ins, string asmstr, InstrItinClass itin, IType type> :
|
|
|
|
InstHexagon<outs, ins, asmstr, [], "", itin, type>;
|
|
|
|
|
2012-02-18 20:03:15 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2014-05-08 03:07:34 +08:00
|
|
|
// Instruction Classes Definitions +
|
2012-02-18 20:03:15 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2011-12-13 05:14:40 +08:00
|
|
|
|
|
|
|
// LD Instruction Class in V2/V3/V4.
|
|
|
|
// Definition of the instruction class NOT CHANGED.
|
2014-12-24 04:02:16 +08:00
|
|
|
let mayLoad = 1 in
|
2013-02-15 03:57:17 +08:00
|
|
|
class LDInst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = LD_tc_ld_SLOT01>
|
2015-03-11 04:56:22 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeLD>, OpcodeHexagon;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2017-02-10 23:33:13 +08:00
|
|
|
class PseudoLDInst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "", InstrItinClass itin = LD_tc_ld_SLOT01>
|
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeLD>, OpcodeHexagon;
|
2013-02-15 03:57:17 +08:00
|
|
|
|
|
|
|
class CONSTLDInst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "">
|
2017-02-10 23:33:13 +08:00
|
|
|
: PseudoLDInst<outs, ins, asmstr, pattern, cstr>;
|
2012-05-04 00:18:50 +08:00
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
// LD Instruction Class in V2/V3/V4.
|
|
|
|
// Definition of the instruction class NOT CHANGED.
|
2013-02-15 03:57:17 +08:00
|
|
|
class LDInstPost<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "">
|
|
|
|
: LDInst<outs, ins, asmstr, pattern, cstr>;
|
|
|
|
|
|
|
|
let mayLoad = 1 in
|
|
|
|
class LD0Inst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin=LD_tc_ld_SLOT0>
|
2015-03-11 04:56:22 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeLD>, OpcodeHexagon;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2015-10-17 09:33:04 +08:00
|
|
|
let mayLoad = 1 in
|
|
|
|
class LD1Inst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "", InstrItinClass itin=LD_tc_ld_SLOT0>
|
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeLD>;
|
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
// ST Instruction Class in V2/V3 can take SLOT0 only.
|
|
|
|
// ST Instruction Class in V4 can take SLOT0 & SLOT1.
|
|
|
|
// Definition of the instruction class CHANGED from V2/V3 to V4.
|
2013-02-15 03:57:17 +08:00
|
|
|
let mayStore = 1 in
|
|
|
|
class STInst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = ST_tc_st_SLOT01>
|
2015-03-11 04:56:22 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeST>, OpcodeHexagon;
|
2012-05-04 00:18:50 +08:00
|
|
|
|
2017-02-10 23:33:13 +08:00
|
|
|
let mayStore = 1 in
|
|
|
|
class STInst_NoOpcode<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "", InstrItinClass itin = ST_tc_st_SLOT01>
|
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeST>;
|
|
|
|
|
2013-02-15 03:57:17 +08:00
|
|
|
class STInst2<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "">
|
|
|
|
: STInst<outs, ins, asmstr, pattern, cstr>;
|
2012-05-04 00:18:50 +08:00
|
|
|
|
2013-02-15 03:57:17 +08:00
|
|
|
let mayStore = 1 in
|
|
|
|
class ST0Inst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = ST_tc_ld_SLOT0>
|
2015-03-11 04:56:22 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeST>, OpcodeHexagon;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2015-10-17 09:33:04 +08:00
|
|
|
// Same as ST0Inst but doesn't derive from OpcodeHexagon.
|
|
|
|
let mayStore = 1 in
|
|
|
|
class ST1Inst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "", InstrItinClass itin = ST_tc_st_SLOT0>
|
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeST>;
|
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
// ST Instruction Class in V2/V3 can take SLOT0 only.
|
|
|
|
// ST Instruction Class in V4 can take SLOT0 & SLOT1.
|
|
|
|
// Definition of the instruction class CHANGED from V2/V3 to V4.
|
2013-02-15 03:57:17 +08:00
|
|
|
class STInstPost<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = ST_tc_st_SLOT01>
|
|
|
|
: STInst<outs, ins, asmstr, pattern, cstr, itin>;
|
2013-02-15 03:57:17 +08:00
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
// ALU64 Instruction Class in V2/V3.
|
|
|
|
// XTYPE Instruction Class in V4.
|
|
|
|
// Definition of the instruction class NOT CHANGED.
|
|
|
|
// Name of the Instruction Class changed from ALU64 to XTYPE from V2/V3 to V4.
|
2013-02-15 03:57:17 +08:00
|
|
|
class ALU64Inst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = ALU64_tc_2_SLOT23>
|
2017-02-08 01:47:37 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeALU64>,
|
2015-03-11 04:56:22 +08:00
|
|
|
OpcodeHexagon;
|
2013-02-15 03:57:17 +08:00
|
|
|
|
2017-02-08 01:47:37 +08:00
|
|
|
// ALU64 Instruction Class in V2/V3.
|
|
|
|
// XTYPE Instruction Class in V4.
|
|
|
|
// Definition of the instruction class NOT CHANGED.
|
|
|
|
// Name of the Instruction Class changed from ALU64 to XTYPE from V2/V3 to V4.
|
|
|
|
class ALU64Inst_NoOpcode<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "", InstrItinClass itin = ALU64_tc_2_SLOT23>
|
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeALU64>;
|
|
|
|
|
|
|
|
|
2013-02-15 03:57:17 +08:00
|
|
|
class ALU64_acc<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = ALU64_tc_2_SLOT23>
|
|
|
|
: ALU64Inst<outs, ins, asmstr, pattern, cstr, itin>;
|
2012-05-04 00:18:50 +08:00
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
|
|
|
|
// M Instruction Class in V2/V3.
|
|
|
|
// XTYPE Instruction Class in V4.
|
|
|
|
// Definition of the instruction class NOT CHANGED.
|
|
|
|
// Name of the Instruction Class changed from M to XTYPE from V2/V3 to V4.
|
2013-02-15 03:57:17 +08:00
|
|
|
class MInst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = M_tc_3x_SLOT23>
|
2017-02-08 01:47:37 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeM>,
|
2015-03-11 04:56:22 +08:00
|
|
|
OpcodeHexagon;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2015-10-17 09:33:04 +08:00
|
|
|
// Same as above but doesn't derive from OpcodeHexagon
|
|
|
|
class MInst2<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "", InstrItinClass itin = M_tc_3x_SLOT23>
|
2017-02-08 01:47:37 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeM>;
|
2015-10-17 09:33:04 +08:00
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
// M Instruction Class in V2/V3.
|
|
|
|
// XTYPE Instruction Class in V4.
|
|
|
|
// Definition of the instruction class NOT CHANGED.
|
|
|
|
// Name of the Instruction Class changed from M to XTYPE from V2/V3 to V4.
|
2013-02-15 03:57:17 +08:00
|
|
|
class MInst_acc<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = M_tc_2_SLOT23>
|
|
|
|
: MInst<outs, ins, asmstr, pattern, cstr, itin>;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
|
|
|
// S Instruction Class in V2/V3.
|
|
|
|
// XTYPE Instruction Class in V4.
|
|
|
|
// Definition of the instruction class NOT CHANGED.
|
|
|
|
// Name of the Instruction Class changed from S to XTYPE from V2/V3 to V4.
|
2013-02-15 03:57:17 +08:00
|
|
|
class SInst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = S_2op_tc_1_SLOT23>
|
2017-02-08 01:47:37 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeS_2op>,
|
2015-03-11 04:56:22 +08:00
|
|
|
OpcodeHexagon;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2017-02-08 01:47:37 +08:00
|
|
|
class SInst_NoOpcode<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "", InstrItinClass itin = S_2op_tc_1_SLOT23>
|
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeS_2op>;
|
|
|
|
|
2015-10-17 09:33:04 +08:00
|
|
|
class SInst2<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "", InstrItinClass itin = S_2op_tc_1_SLOT23>
|
2017-02-08 01:47:37 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeS_2op>;
|
2015-10-17 09:33:04 +08:00
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
// S Instruction Class in V2/V3.
|
|
|
|
// XTYPE Instruction Class in V4.
|
|
|
|
// Definition of the instruction class NOT CHANGED.
|
|
|
|
// Name of the Instruction Class changed from S to XTYPE from V2/V3 to V4.
|
2013-02-15 03:57:17 +08:00
|
|
|
class SInst_acc<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = S_3op_tc_1_SLOT23>
|
2017-02-08 01:47:37 +08:00
|
|
|
: SInst<outs, ins, asmstr, pattern, cstr, itin> {
|
|
|
|
let Type = TypeS_3op;
|
|
|
|
}
|
2011-12-13 05:14:40 +08:00
|
|
|
|
|
|
|
// J Instruction Class in V2/V3/V4.
|
|
|
|
// Definition of the instruction class NOT CHANGED.
|
2013-02-15 03:57:17 +08:00
|
|
|
class JInst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = J_tc_2early_SLOT23>
|
2015-03-11 04:56:22 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeJ>, OpcodeHexagon;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2016-07-16 00:58:34 +08:00
|
|
|
class JInst_CJUMP_UCJUMP<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "", InstrItinClass itin = J_tc_2early_CJUMP_UCJUMP_ARCHDEPSLOT>
|
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeJ>, OpcodeHexagon;
|
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
// CR Instruction Class in V2/V3/V4.
|
|
|
|
// Definition of the instruction class NOT CHANGED.
|
2013-02-15 03:57:17 +08:00
|
|
|
class CRInst<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = CR_tc_2early_SLOT3>
|
2015-03-11 04:56:22 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCR>, OpcodeHexagon;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2013-02-15 03:57:17 +08:00
|
|
|
let isCodeGenOnly = 1, isPseudo = 1 in
|
|
|
|
class Endloop<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
2014-05-09 02:47:08 +08:00
|
|
|
string cstr = "", InstrItinClass itin = J_tc_2early_SLOT0123>
|
2015-03-11 04:56:22 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeENDLOOP>,
|
|
|
|
OpcodeHexagon;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2013-02-15 03:57:17 +08:00
|
|
|
let isCodeGenOnly = 1, isPseudo = 1 in
|
|
|
|
class Pseudo<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "">
|
2015-03-11 04:56:22 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, PSEUDO, TypePSEUDO>,
|
|
|
|
OpcodeHexagon;
|
2013-02-15 03:57:17 +08:00
|
|
|
|
|
|
|
let isCodeGenOnly = 1, isPseudo = 1 in
|
|
|
|
class PseudoM<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr="">
|
2015-03-11 04:56:22 +08:00
|
|
|
: InstHexagon<outs, ins, asmstr, pattern, cstr, PSEUDOM, TypePSEUDO>,
|
|
|
|
OpcodeHexagon;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2012-02-18 20:03:15 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2014-05-08 03:07:34 +08:00
|
|
|
// Instruction Classes Definitions -
|
2012-02-18 20:03:15 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2011-12-13 05:14:40 +08:00
|
|
|
|
|
|
|
//
|
|
|
|
// ALU64 patterns.
|
|
|
|
//
|
2014-05-09 02:47:08 +08:00
|
|
|
class ALU64_rr<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "", InstrItinClass itin = ALU64_tc_1_SLOT23>
|
|
|
|
: ALU64Inst<outs, ins, asmstr, pattern, cstr, itin>;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2014-05-09 02:47:08 +08:00
|
|
|
class ALU64_ri<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "", InstrItinClass itin = ALU64_tc_1_SLOT23>
|
|
|
|
: ALU64Inst<outs, ins, asmstr, pattern, cstr, itin>;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
|
|
|
// Post increment ST Instruction.
|
2013-02-15 03:57:17 +08:00
|
|
|
class STInstPI<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "">
|
|
|
|
: STInst<outs, ins, asmstr, pattern, cstr>;
|
2012-05-04 00:18:50 +08:00
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
// Post increment LD Instruction.
|
2013-02-15 03:57:17 +08:00
|
|
|
class LDInstPI<dag outs, dag ins, string asmstr, list<dag> pattern = [],
|
|
|
|
string cstr = "">
|
|
|
|
: LDInst<outs, ins, asmstr, pattern, cstr>;
|
|
|
|
|
2011-12-13 05:14:40 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// V4 Instruction Format Definitions +
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "HexagonInstrFormatsV4.td"
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// V4 Instruction Format Definitions +
|
|
|
|
//===----------------------------------------------------------------------===//
|
2015-10-17 09:33:04 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// V60 Instruction Format Definitions +
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "HexagonInstrFormatsV60.td"
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// V60 Instruction Format Definitions +
|
|
|
|
//===----------------------------------------------------------------------===//
|