2013-02-21 23:16:44 +08:00
|
|
|
//===-- SIInstrFormats.td - SI Instruction Encodings ----------------------===//
|
2012-12-12 05:25:42 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// SI Instruction format definitions.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2016-06-23 04:15:28 +08:00
|
|
|
class InstSI <dag outs, dag ins, string asm = "",
|
|
|
|
list<dag> pattern = []> :
|
|
|
|
AMDGPUInst<outs, ins, asm, pattern>, PredicateControl {
|
2013-02-21 23:16:44 +08:00
|
|
|
|
|
|
|
field bits<1> VM_CNT = 0;
|
|
|
|
field bits<1> EXP_CNT = 0;
|
|
|
|
field bits<1> LGKM_CNT = 0;
|
2014-12-01 23:52:46 +08:00
|
|
|
|
|
|
|
field bits<1> SALU = 0;
|
|
|
|
field bits<1> VALU = 0;
|
|
|
|
|
|
|
|
field bits<1> SOP1 = 0;
|
|
|
|
field bits<1> SOP2 = 0;
|
|
|
|
field bits<1> SOPC = 0;
|
|
|
|
field bits<1> SOPK = 0;
|
|
|
|
field bits<1> SOPP = 0;
|
|
|
|
|
2013-10-11 01:11:55 +08:00
|
|
|
field bits<1> VOP1 = 0;
|
|
|
|
field bits<1> VOP2 = 0;
|
|
|
|
field bits<1> VOP3 = 0;
|
|
|
|
field bits<1> VOPC = 0;
|
2016-04-26 21:33:56 +08:00
|
|
|
field bits<1> SDWA = 0;
|
2016-03-09 20:29:31 +08:00
|
|
|
field bits<1> DPP = 0;
|
2014-12-01 23:52:46 +08:00
|
|
|
|
2014-07-30 02:51:56 +08:00
|
|
|
field bits<1> MUBUF = 0;
|
|
|
|
field bits<1> MTBUF = 0;
|
2014-12-01 23:52:46 +08:00
|
|
|
field bits<1> SMRD = 0;
|
|
|
|
field bits<1> DS = 0;
|
|
|
|
field bits<1> MIMG = 0;
|
2014-09-15 23:41:53 +08:00
|
|
|
field bits<1> FLAT = 0;
|
2016-08-03 03:31:14 +08:00
|
|
|
|
|
|
|
// Whether WQM _must_ be enabled for this instruction.
|
2015-02-06 10:51:20 +08:00
|
|
|
field bits<1> WQM = 0;
|
2015-05-13 02:59:17 +08:00
|
|
|
field bits<1> VGPRSpill = 0;
|
2016-09-10 09:20:33 +08:00
|
|
|
field bits<1> SGPRSpill = 0;
|
2013-02-21 23:16:44 +08:00
|
|
|
|
2015-10-06 23:57:53 +08:00
|
|
|
// This bit tells the assembler to use the 32-bit encoding in case it
|
|
|
|
// is unable to infer the encoding from the operands.
|
|
|
|
field bits<1> VOPAsmPrefer32Bit = 0;
|
|
|
|
|
2016-07-12 05:59:43 +08:00
|
|
|
field bits<1> Gather4 = 0;
|
|
|
|
|
2016-08-03 03:31:14 +08:00
|
|
|
// Whether WQM _must_ be disabled for this instruction.
|
|
|
|
field bits<1> DisableWQM = 0;
|
|
|
|
|
2016-09-17 05:41:16 +08:00
|
|
|
// Most sopk treat the immediate as a signed 16-bit, however some
|
|
|
|
// use it as unsigned.
|
|
|
|
field bits<1> SOPKZext = 0;
|
|
|
|
|
2014-07-30 02:51:56 +08:00
|
|
|
// These need to be kept in sync with the enum in SIInstrFlags.
|
2013-02-21 23:16:44 +08:00
|
|
|
let TSFlags{0} = VM_CNT;
|
|
|
|
let TSFlags{1} = EXP_CNT;
|
|
|
|
let TSFlags{2} = LGKM_CNT;
|
2014-12-01 23:52:46 +08:00
|
|
|
|
|
|
|
let TSFlags{3} = SALU;
|
|
|
|
let TSFlags{4} = VALU;
|
|
|
|
|
|
|
|
let TSFlags{5} = SOP1;
|
|
|
|
let TSFlags{6} = SOP2;
|
|
|
|
let TSFlags{7} = SOPC;
|
|
|
|
let TSFlags{8} = SOPK;
|
|
|
|
let TSFlags{9} = SOPP;
|
|
|
|
|
|
|
|
let TSFlags{10} = VOP1;
|
|
|
|
let TSFlags{11} = VOP2;
|
|
|
|
let TSFlags{12} = VOP3;
|
|
|
|
let TSFlags{13} = VOPC;
|
2016-04-26 21:33:56 +08:00
|
|
|
let TSFlags{14} = SDWA;
|
|
|
|
let TSFlags{15} = DPP;
|
|
|
|
|
|
|
|
let TSFlags{16} = MUBUF;
|
|
|
|
let TSFlags{17} = MTBUF;
|
|
|
|
let TSFlags{18} = SMRD;
|
|
|
|
let TSFlags{19} = DS;
|
|
|
|
let TSFlags{20} = MIMG;
|
|
|
|
let TSFlags{21} = FLAT;
|
|
|
|
let TSFlags{22} = WQM;
|
|
|
|
let TSFlags{23} = VGPRSpill;
|
2016-09-10 09:20:33 +08:00
|
|
|
let TSFlags{24} = SGPRSpill;
|
|
|
|
let TSFlags{25} = VOPAsmPrefer32Bit;
|
|
|
|
let TSFlags{26} = Gather4;
|
|
|
|
let TSFlags{27} = DisableWQM;
|
2016-09-17 05:41:16 +08:00
|
|
|
let TSFlags{28} = SOPKZext;
|
2014-09-27 01:54:59 +08:00
|
|
|
|
2015-01-14 09:13:19 +08:00
|
|
|
let SchedRW = [Write32Bit];
|
2016-02-18 11:42:32 +08:00
|
|
|
|
|
|
|
field bits<1> DisableSIDecoder = 0;
|
|
|
|
field bits<1> DisableVIDecoder = 0;
|
|
|
|
field bits<1> DisableDecoder = 0;
|
|
|
|
|
|
|
|
let isAsmParserOnly = !if(!eq(DisableDecoder{0}, {0}), 0, 1);
|
2016-09-09 17:37:51 +08:00
|
|
|
let AsmVariantName = AMDGPUAsmVariants.Default;
|
2013-02-21 23:16:44 +08:00
|
|
|
}
|
|
|
|
|
2016-07-12 08:23:17 +08:00
|
|
|
class PseudoInstSI<dag outs, dag ins, list<dag> pattern = []>
|
|
|
|
: InstSI<outs, ins, "", pattern> {
|
|
|
|
let isPseudo = 1;
|
|
|
|
let isCodeGenOnly = 1;
|
|
|
|
}
|
|
|
|
|
2016-08-27 11:00:51 +08:00
|
|
|
class SPseudoInstSI<dag outs, dag ins, list<dag> pattern = []>
|
|
|
|
: PseudoInstSI<outs, ins, pattern> {
|
|
|
|
let SALU = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
class VPseudoInstSI<dag outs, dag ins, list<dag> pattern = []>
|
|
|
|
: PseudoInstSI<outs, ins, pattern> {
|
|
|
|
let VALU = 1;
|
|
|
|
let Uses = [EXEC];
|
|
|
|
}
|
|
|
|
|
|
|
|
class CFPseudoInstSI<dag outs, dag ins, list<dag> pattern = [],
|
|
|
|
bit UseExec = 0, bit DefExec = 0> :
|
|
|
|
SPseudoInstSI<outs, ins, pattern> {
|
|
|
|
|
|
|
|
let Uses = !if(UseExec, [EXEC], []);
|
|
|
|
let Defs = !if(DefExec, [EXEC, SCC], [SCC]);
|
|
|
|
}
|
|
|
|
|
2014-07-22 01:44:28 +08:00
|
|
|
class Enc32 {
|
2013-02-21 23:16:44 +08:00
|
|
|
field bits<32> Inst;
|
2014-07-22 01:44:28 +08:00
|
|
|
int Size = 4;
|
2013-02-21 23:16:44 +08:00
|
|
|
}
|
2012-12-12 05:25:42 +08:00
|
|
|
|
2014-07-22 01:44:28 +08:00
|
|
|
class Enc64 {
|
2013-02-21 23:16:44 +08:00
|
|
|
field bits<64> Inst;
|
2014-07-22 01:44:28 +08:00
|
|
|
int Size = 8;
|
2013-02-21 23:16:44 +08:00
|
|
|
}
|
2012-12-12 05:25:42 +08:00
|
|
|
|
2015-03-13 05:34:22 +08:00
|
|
|
class VOPDstOperand <RegisterClass rc> : RegisterOperand <rc, "printVOPDst">;
|
|
|
|
|
2014-12-07 20:18:57 +08:00
|
|
|
let Uses = [EXEC] in {
|
|
|
|
|
2015-01-16 02:42:44 +08:00
|
|
|
class VOPAnyCommon <dag outs, dag ins, string asm, list<dag> pattern> :
|
|
|
|
InstSI <outs, ins, asm, pattern> {
|
2014-12-07 20:18:57 +08:00
|
|
|
|
|
|
|
let mayLoad = 0;
|
|
|
|
let mayStore = 0;
|
|
|
|
let hasSideEffects = 0;
|
|
|
|
let UseNamedOperandTable = 1;
|
|
|
|
let VALU = 1;
|
2015-01-16 02:42:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
class VOPCCommon <dag ins, string asm, list<dag> pattern> :
|
2015-08-08 08:41:48 +08:00
|
|
|
VOPAnyCommon <(outs), ins, asm, pattern> {
|
2015-01-16 02:42:44 +08:00
|
|
|
|
|
|
|
let VOPC = 1;
|
2014-12-07 20:18:57 +08:00
|
|
|
let Size = 4;
|
2015-08-08 08:41:48 +08:00
|
|
|
let Defs = [VCC];
|
2014-12-07 20:18:57 +08:00
|
|
|
}
|
|
|
|
|
2014-10-08 07:51:34 +08:00
|
|
|
class VOP1Common <dag outs, dag ins, string asm, list<dag> pattern> :
|
2015-01-16 02:42:44 +08:00
|
|
|
VOPAnyCommon <outs, ins, asm, pattern> {
|
|
|
|
|
2014-10-08 07:51:34 +08:00
|
|
|
let VOP1 = 1;
|
2014-12-07 20:18:57 +08:00
|
|
|
let Size = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
class VOP2Common <dag outs, dag ins, string asm, list<dag> pattern> :
|
2015-01-16 02:42:44 +08:00
|
|
|
VOPAnyCommon <outs, ins, asm, pattern> {
|
2014-12-07 20:18:57 +08:00
|
|
|
|
|
|
|
let VOP2 = 1;
|
|
|
|
let Size = 4;
|
2014-10-08 07:51:34 +08:00
|
|
|
}
|
|
|
|
|
2016-07-12 08:23:17 +08:00
|
|
|
class VOP3Common <dag outs, dag ins, string asm = "",
|
|
|
|
list<dag> pattern = [], bit HasMods = 0,
|
|
|
|
bit VOP3Only = 0> :
|
|
|
|
VOPAnyCommon <outs, ins, asm, pattern> {
|
2014-06-18 03:34:46 +08:00
|
|
|
|
2014-08-01 08:32:39 +08:00
|
|
|
// Using complex patterns gives VOP3 patterns a very high complexity rating,
|
|
|
|
// but standalone patterns are almost always prefered, so we need to adjust the
|
|
|
|
// priority lower. The goal is to use a high number to reduce complexity to
|
|
|
|
// zero (or less than zero).
|
|
|
|
let AddedComplexity = -1000;
|
|
|
|
|
2014-06-18 03:34:46 +08:00
|
|
|
let VOP3 = 1;
|
2015-04-08 09:09:26 +08:00
|
|
|
let VALU = 1;
|
|
|
|
|
2016-02-11 11:28:15 +08:00
|
|
|
let AsmMatchConverter =
|
|
|
|
!if(!eq(VOP3Only,1),
|
2016-05-06 19:31:17 +08:00
|
|
|
"cvtVOP3",
|
|
|
|
!if(!eq(HasMods,1), "cvtVOP3_2_mod", ""));
|
|
|
|
|
2016-09-09 17:37:51 +08:00
|
|
|
let AsmVariantName = AMDGPUAsmVariants.VOP3;
|
|
|
|
|
2015-04-08 09:09:26 +08:00
|
|
|
let isCodeGenOnly = 0;
|
|
|
|
|
2014-07-22 01:44:29 +08:00
|
|
|
int Size = 8;
|
2015-09-26 13:06:48 +08:00
|
|
|
|
|
|
|
// Because SGPRs may be allowed if there are multiple operands, we
|
|
|
|
// need a post-isel hook to insert copies in order to avoid
|
|
|
|
// violating constant bus requirements.
|
|
|
|
let hasPostISelHook = 1;
|
2014-06-18 03:34:46 +08:00
|
|
|
}
|
|
|
|
|
2014-12-07 20:18:57 +08:00
|
|
|
} // End Uses = [EXEC]
|
|
|
|
|
2013-02-21 23:16:44 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector ALU operations
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-07-22 01:44:28 +08:00
|
|
|
class VOP1e <bits<8> op> : Enc32 {
|
2015-02-18 10:15:35 +08:00
|
|
|
bits<8> vdst;
|
|
|
|
bits<9> src0;
|
2013-02-21 23:16:44 +08:00
|
|
|
|
2015-02-18 10:15:35 +08:00
|
|
|
let Inst{8-0} = src0;
|
2013-02-21 23:16:44 +08:00
|
|
|
let Inst{16-9} = op;
|
2015-02-18 10:15:35 +08:00
|
|
|
let Inst{24-17} = vdst;
|
2013-02-21 23:16:44 +08:00
|
|
|
let Inst{31-25} = 0x3f; //encoding
|
|
|
|
}
|
2012-12-12 05:25:42 +08:00
|
|
|
|
2014-07-22 01:44:28 +08:00
|
|
|
class VOP2e <bits<6> op> : Enc32 {
|
2015-02-18 10:15:35 +08:00
|
|
|
bits<8> vdst;
|
|
|
|
bits<9> src0;
|
2015-02-19 06:12:45 +08:00
|
|
|
bits<8> src1;
|
2013-02-21 23:16:44 +08:00
|
|
|
|
2015-02-18 10:15:35 +08:00
|
|
|
let Inst{8-0} = src0;
|
2015-02-19 06:12:45 +08:00
|
|
|
let Inst{16-9} = src1;
|
2015-02-18 10:15:35 +08:00
|
|
|
let Inst{24-17} = vdst;
|
2013-02-21 23:16:44 +08:00
|
|
|
let Inst{30-25} = op;
|
|
|
|
let Inst{31} = 0x0; //encoding
|
|
|
|
}
|
2012-12-12 05:25:42 +08:00
|
|
|
|
2015-02-22 05:29:00 +08:00
|
|
|
class VOP2_MADKe <bits<6> op> : Enc64 {
|
|
|
|
|
|
|
|
bits<8> vdst;
|
|
|
|
bits<9> src0;
|
2016-04-01 21:13:12 +08:00
|
|
|
bits<8> src1;
|
|
|
|
bits<32> imm;
|
2015-02-22 05:29:00 +08:00
|
|
|
|
|
|
|
let Inst{8-0} = src0;
|
2016-04-01 21:13:12 +08:00
|
|
|
let Inst{16-9} = src1;
|
2015-02-22 05:29:00 +08:00
|
|
|
let Inst{24-17} = vdst;
|
|
|
|
let Inst{30-25} = op;
|
|
|
|
let Inst{31} = 0x0; // encoding
|
2016-04-01 21:13:12 +08:00
|
|
|
let Inst{63-32} = imm;
|
2015-02-22 05:29:00 +08:00
|
|
|
}
|
|
|
|
|
2016-02-17 02:14:56 +08:00
|
|
|
class VOP3a <bits<9> op> : Enc64 {
|
2014-05-11 03:18:33 +08:00
|
|
|
bits<2> src0_modifiers;
|
2013-05-20 23:02:08 +08:00
|
|
|
bits<9> src0;
|
2014-05-11 03:18:33 +08:00
|
|
|
bits<2> src1_modifiers;
|
2013-05-20 23:02:08 +08:00
|
|
|
bits<9> src1;
|
2014-05-11 03:18:33 +08:00
|
|
|
bits<2> src2_modifiers;
|
2013-05-20 23:02:08 +08:00
|
|
|
bits<9> src2;
|
|
|
|
bits<1> clamp;
|
|
|
|
bits<2> omod;
|
|
|
|
|
2014-05-11 03:18:33 +08:00
|
|
|
let Inst{8} = src0_modifiers{1};
|
|
|
|
let Inst{9} = src1_modifiers{1};
|
|
|
|
let Inst{10} = src2_modifiers{1};
|
2013-05-20 23:02:08 +08:00
|
|
|
let Inst{11} = clamp;
|
2013-02-21 23:16:44 +08:00
|
|
|
let Inst{25-17} = op;
|
|
|
|
let Inst{31-26} = 0x34; //encoding
|
2013-05-20 23:02:08 +08:00
|
|
|
let Inst{40-32} = src0;
|
|
|
|
let Inst{49-41} = src1;
|
|
|
|
let Inst{58-50} = src2;
|
|
|
|
let Inst{60-59} = omod;
|
2014-05-11 03:18:33 +08:00
|
|
|
let Inst{61} = src0_modifiers{0};
|
|
|
|
let Inst{62} = src1_modifiers{0};
|
|
|
|
let Inst{63} = src2_modifiers{0};
|
2013-02-16 19:28:02 +08:00
|
|
|
}
|
|
|
|
|
2016-02-17 02:14:56 +08:00
|
|
|
class VOP3e <bits<9> op> : VOP3a <op> {
|
|
|
|
bits<8> vdst;
|
|
|
|
|
|
|
|
let Inst{7-0} = vdst;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Encoding used for VOPC instructions encoded as VOP3
|
|
|
|
// Differs from VOP3e by destination name (sdst) as VOPC doesn't have vector dst
|
|
|
|
class VOP3ce <bits<9> op> : VOP3a <op> {
|
|
|
|
bits<8> sdst;
|
|
|
|
|
|
|
|
let Inst{7-0} = sdst;
|
|
|
|
}
|
|
|
|
|
2014-07-22 01:44:28 +08:00
|
|
|
class VOP3be <bits<9> op> : Enc64 {
|
2015-02-14 11:54:29 +08:00
|
|
|
bits<8> vdst;
|
2014-05-11 03:18:33 +08:00
|
|
|
bits<2> src0_modifiers;
|
2013-05-20 23:02:08 +08:00
|
|
|
bits<9> src0;
|
2014-05-11 03:18:33 +08:00
|
|
|
bits<2> src1_modifiers;
|
2013-05-20 23:02:08 +08:00
|
|
|
bits<9> src1;
|
2014-05-11 03:18:33 +08:00
|
|
|
bits<2> src2_modifiers;
|
2013-05-20 23:02:08 +08:00
|
|
|
bits<9> src2;
|
|
|
|
bits<7> sdst;
|
|
|
|
bits<2> omod;
|
2013-02-21 23:16:44 +08:00
|
|
|
|
2015-02-14 11:54:29 +08:00
|
|
|
let Inst{7-0} = vdst;
|
2013-05-20 23:02:08 +08:00
|
|
|
let Inst{14-8} = sdst;
|
2013-02-21 23:16:44 +08:00
|
|
|
let Inst{25-17} = op;
|
|
|
|
let Inst{31-26} = 0x34; //encoding
|
2013-05-20 23:02:08 +08:00
|
|
|
let Inst{40-32} = src0;
|
|
|
|
let Inst{49-41} = src1;
|
|
|
|
let Inst{58-50} = src2;
|
|
|
|
let Inst{60-59} = omod;
|
2014-05-11 03:18:33 +08:00
|
|
|
let Inst{61} = src0_modifiers{0};
|
|
|
|
let Inst{62} = src1_modifiers{0};
|
|
|
|
let Inst{63} = src2_modifiers{0};
|
2013-02-16 19:28:02 +08:00
|
|
|
}
|
|
|
|
|
2014-07-22 01:44:28 +08:00
|
|
|
class VOPCe <bits<8> op> : Enc32 {
|
2015-02-18 10:15:35 +08:00
|
|
|
bits<9> src0;
|
2016-03-11 22:53:28 +08:00
|
|
|
bits<8> src1;
|
2013-02-21 23:16:44 +08:00
|
|
|
|
2015-02-18 10:15:35 +08:00
|
|
|
let Inst{8-0} = src0;
|
2016-03-11 22:53:28 +08:00
|
|
|
let Inst{16-9} = src1;
|
2013-02-21 23:16:44 +08:00
|
|
|
let Inst{24-17} = op;
|
|
|
|
let Inst{31-25} = 0x3e;
|
2013-02-16 19:28:02 +08:00
|
|
|
}
|
|
|
|
|
2014-07-22 01:44:28 +08:00
|
|
|
class VINTRPe <bits<2> op> : Enc32 {
|
2015-02-18 10:15:35 +08:00
|
|
|
bits<8> vdst;
|
|
|
|
bits<8> vsrc;
|
|
|
|
bits<2> attrchan;
|
|
|
|
bits<6> attr;
|
2013-02-21 23:16:44 +08:00
|
|
|
|
2015-02-18 10:15:35 +08:00
|
|
|
let Inst{7-0} = vsrc;
|
|
|
|
let Inst{9-8} = attrchan;
|
|
|
|
let Inst{15-10} = attr;
|
2013-02-21 23:16:44 +08:00
|
|
|
let Inst{17-16} = op;
|
2015-02-18 10:15:35 +08:00
|
|
|
let Inst{25-18} = vdst;
|
2013-02-21 23:16:44 +08:00
|
|
|
let Inst{31-26} = 0x32; // encoding
|
2013-02-16 19:28:02 +08:00
|
|
|
}
|
|
|
|
|
2014-07-22 01:44:28 +08:00
|
|
|
class MIMGe <bits<7> op> : Enc64 {
|
2015-02-18 10:15:35 +08:00
|
|
|
bits<8> vdata;
|
|
|
|
bits<4> dmask;
|
|
|
|
bits<1> unorm;
|
|
|
|
bits<1> glc;
|
|
|
|
bits<1> da;
|
|
|
|
bits<1> r128;
|
|
|
|
bits<1> tfe;
|
|
|
|
bits<1> lwe;
|
|
|
|
bits<1> slc;
|
|
|
|
bits<8> vaddr;
|
|
|
|
bits<7> srsrc;
|
|
|
|
bits<7> ssamp;
|
|
|
|
|
|
|
|
let Inst{11-8} = dmask;
|
|
|
|
let Inst{12} = unorm;
|
|
|
|
let Inst{13} = glc;
|
|
|
|
let Inst{14} = da;
|
|
|
|
let Inst{15} = r128;
|
|
|
|
let Inst{16} = tfe;
|
|
|
|
let Inst{17} = lwe;
|
2013-02-21 23:16:44 +08:00
|
|
|
let Inst{24-18} = op;
|
2015-02-18 10:15:35 +08:00
|
|
|
let Inst{25} = slc;
|
2013-02-21 23:16:44 +08:00
|
|
|
let Inst{31-26} = 0x3c;
|
2015-02-18 10:15:35 +08:00
|
|
|
let Inst{39-32} = vaddr;
|
|
|
|
let Inst{47-40} = vdata;
|
|
|
|
let Inst{52-48} = srsrc{6-2};
|
|
|
|
let Inst{57-53} = ssamp{6-2};
|
2013-02-21 23:16:44 +08:00
|
|
|
}
|
|
|
|
|
2014-09-15 23:41:53 +08:00
|
|
|
class EXPe : Enc64 {
|
2015-02-18 10:15:35 +08:00
|
|
|
bits<4> en;
|
|
|
|
bits<6> tgt;
|
|
|
|
bits<1> compr;
|
|
|
|
bits<1> done;
|
|
|
|
bits<1> vm;
|
|
|
|
bits<8> vsrc0;
|
|
|
|
bits<8> vsrc1;
|
|
|
|
bits<8> vsrc2;
|
|
|
|
bits<8> vsrc3;
|
|
|
|
|
|
|
|
let Inst{3-0} = en;
|
|
|
|
let Inst{9-4} = tgt;
|
|
|
|
let Inst{10} = compr;
|
|
|
|
let Inst{11} = done;
|
|
|
|
let Inst{12} = vm;
|
2013-02-21 23:16:44 +08:00
|
|
|
let Inst{31-26} = 0x3e;
|
2015-02-18 10:15:35 +08:00
|
|
|
let Inst{39-32} = vsrc0;
|
|
|
|
let Inst{47-40} = vsrc1;
|
|
|
|
let Inst{55-48} = vsrc2;
|
|
|
|
let Inst{63-56} = vsrc3;
|
2014-07-22 01:44:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
let Uses = [EXEC] in {
|
|
|
|
|
|
|
|
class VOP1 <bits<8> op, dag outs, dag ins, string asm, list<dag> pattern> :
|
2014-10-08 07:51:34 +08:00
|
|
|
VOP1Common <outs, ins, asm, pattern>,
|
2015-04-08 09:09:26 +08:00
|
|
|
VOP1e<op> {
|
|
|
|
let isCodeGenOnly = 0;
|
|
|
|
}
|
2014-07-22 01:44:28 +08:00
|
|
|
|
|
|
|
class VOP2 <bits<6> op, dag outs, dag ins, string asm, list<dag> pattern> :
|
2015-04-08 09:09:26 +08:00
|
|
|
VOP2Common <outs, ins, asm, pattern>, VOP2e<op> {
|
|
|
|
let isCodeGenOnly = 0;
|
|
|
|
}
|
2014-07-22 01:44:28 +08:00
|
|
|
|
|
|
|
class VOPC <bits<8> op, dag ins, string asm, list<dag> pattern> :
|
2014-12-07 20:18:57 +08:00
|
|
|
VOPCCommon <ins, asm, pattern>, VOPCe <op>;
|
2014-07-22 01:44:28 +08:00
|
|
|
|
2014-12-07 20:18:57 +08:00
|
|
|
class VINTRPCommon <dag outs, dag ins, string asm, list<dag> pattern> :
|
|
|
|
InstSI <outs, ins, asm, pattern> {
|
2014-07-22 01:44:28 +08:00
|
|
|
let mayLoad = 1;
|
|
|
|
let mayStore = 0;
|
2014-11-19 07:57:33 +08:00
|
|
|
let hasSideEffects = 0;
|
2014-07-22 01:44:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
} // End Uses = [EXEC]
|
|
|
|
|
2016-03-04 18:39:50 +08:00
|
|
|
class MIMG <dag outs, dag ins, string asm, list<dag> pattern> :
|
|
|
|
InstSI <outs, ins, asm, pattern> {
|
2014-07-22 01:44:28 +08:00
|
|
|
|
|
|
|
let VM_CNT = 1;
|
|
|
|
let EXP_CNT = 1;
|
|
|
|
let MIMG = 1;
|
2015-09-10 09:23:28 +08:00
|
|
|
let Uses = [EXEC];
|
2014-11-19 07:57:33 +08:00
|
|
|
|
2016-02-12 05:45:07 +08:00
|
|
|
let UseNamedOperandTable = 1;
|
2014-11-19 07:57:33 +08:00
|
|
|
let hasSideEffects = 0; // XXX ????
|
2014-07-22 01:44:28 +08:00
|
|
|
}
|