1 //===-- MipsMTInstrInfo.td - Mips MT Instruction Infos -----*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 //===----------------------------------------------------------------------===//
11 // MIPS MT Instruction Encodings
12 //===----------------------------------------------------------------------===//
14 class DMT_ENC : COP0_MFMC0_MT<FIELD5_1_DMT_EMT, FIELD5_2_DMT_EMT,
17 class EMT_ENC : COP0_MFMC0_MT<FIELD5_1_DMT_EMT, FIELD5_2_DMT_EMT,
20 class DVPE_ENC : COP0_MFMC0_MT<FIELD5_1_2_DVPE_EVPE, FIELD5_1_2_DVPE_EVPE,
23 class EVPE_ENC : COP0_MFMC0_MT<FIELD5_1_2_DVPE_EVPE, FIELD5_1_2_DVPE_EVPE,
26 class FORK_ENC : SPECIAL3_MT_FORK;
28 class YIELD_ENC : SPECIAL3_MT_YIELD;
30 //===----------------------------------------------------------------------===//
31 // MIPS MT Instruction Descriptions
32 //===----------------------------------------------------------------------===//
34 class MT_1R_DESC_BASE<string instr_asm, InstrItinClass Itin = NoItinerary> {
35 dag OutOperandList = (outs GPR32Opnd:$rt);
36 dag InOperandList = (ins);
37 string AsmString = !strconcat(instr_asm, "\t$rt");
38 list<dag> Pattern = [];
39 InstrItinClass Itinerary = Itin;
43 dag OutOperandList = (outs GPR32Opnd:$rs, GPR32Opnd:$rd);
44 dag InOperandList = (ins GPR32Opnd:$rt);
45 string AsmString = "fork\t$rd, $rs, $rt";
46 list<dag> Pattern = [];
47 InstrItinClass Itinerary = II_FORK;
51 dag OutOperandList = (outs GPR32Opnd:$rd);
52 dag InOperandList = (ins GPR32Opnd:$rs);
53 string AsmString = "yield\t$rd, $rs";
54 list<dag> Pattern = [];
55 InstrItinClass Itinerary = II_YIELD;
58 class DMT_DESC : MT_1R_DESC_BASE<"dmt", II_DMT>;
60 class EMT_DESC : MT_1R_DESC_BASE<"emt", II_EMT>;
62 class DVPE_DESC : MT_1R_DESC_BASE<"dvpe", II_DVPE>;
64 class EVPE_DESC : MT_1R_DESC_BASE<"evpe", II_EVPE>;
66 //===----------------------------------------------------------------------===//
67 // MIPS MT Instruction Definitions
68 //===----------------------------------------------------------------------===//
69 let hasSideEffects = 1, isNotDuplicable = 1,
70 AdditionalPredicates = [NotInMicroMips] in {
71 def DMT : DMT_ENC, DMT_DESC, ASE_MT;
73 def EMT : EMT_ENC, EMT_DESC, ASE_MT;
75 def DVPE : DVPE_ENC, DVPE_DESC, ASE_MT;
77 def EVPE : EVPE_ENC, EVPE_DESC, ASE_MT;
79 def FORK : FORK_ENC, FORK_DESC, ASE_MT;
81 def YIELD : YIELD_ENC, YIELD_DESC, ASE_MT;
84 //===----------------------------------------------------------------------===//
85 // MIPS MT Instruction Definitions
86 //===----------------------------------------------------------------------===//
88 let AdditionalPredicates = [NotInMicroMips] in {
89 def : MipsInstAlias<"dmt", (DMT ZERO), 1>, ASE_MT;
91 def : MipsInstAlias<"emt", (EMT ZERO), 1>, ASE_MT;
93 def : MipsInstAlias<"dvpe", (DVPE ZERO), 1>, ASE_MT;
95 def : MipsInstAlias<"evpe", (EVPE ZERO), 1>, ASE_MT;
97 def : MipsInstAlias<"yield $rs", (YIELD ZERO, GPR32Opnd:$rs), 1>, ASE_MT;