OSDN Git Service

Revert "[mips][mt][6/7] Add support for mftr, mttr instructions."
[android-x86/external-llvm.git] / lib / Target / Mips / MipsMTInstrInfo.td
1 //===-- MipsMTInstrInfo.td - Mips MT Instruction Infos -----*- tablegen -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 //===----------------------------------------------------------------------===//
11 // MIPS MT Instruction Encodings
12 //===----------------------------------------------------------------------===//
13
14 class DMT_ENC : COP0_MFMC0_MT<FIELD5_1_DMT_EMT, FIELD5_2_DMT_EMT,
15                               OPCODE_SC_D>;
16
17 class EMT_ENC : COP0_MFMC0_MT<FIELD5_1_DMT_EMT, FIELD5_2_DMT_EMT,
18                               OPCODE_SC_E>;
19
20 class DVPE_ENC : COP0_MFMC0_MT<FIELD5_1_2_DVPE_EVPE, FIELD5_1_2_DVPE_EVPE,
21                                OPCODE_SC_D>;
22
23 class EVPE_ENC : COP0_MFMC0_MT<FIELD5_1_2_DVPE_EVPE, FIELD5_1_2_DVPE_EVPE,
24                                OPCODE_SC_E>;
25
26 class FORK_ENC : SPECIAL3_MT_FORK;
27
28 class YIELD_ENC : SPECIAL3_MT_YIELD;
29
30 //===----------------------------------------------------------------------===//
31 // MIPS MT Instruction Descriptions
32 //===----------------------------------------------------------------------===//
33
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;
40 }
41
42 class FORK_DESC {
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;
48 }
49
50 class YIELD_DESC {
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;
56 }
57
58 class DMT_DESC : MT_1R_DESC_BASE<"dmt", II_DMT>;
59
60 class EMT_DESC : MT_1R_DESC_BASE<"emt", II_EMT>;
61
62 class DVPE_DESC : MT_1R_DESC_BASE<"dvpe", II_DVPE>;
63
64 class EVPE_DESC : MT_1R_DESC_BASE<"evpe", II_EVPE>;
65
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;
72
73   def EMT : EMT_ENC, EMT_DESC, ASE_MT;
74
75   def DVPE : DVPE_ENC, DVPE_DESC, ASE_MT;
76
77   def EVPE : EVPE_ENC, EVPE_DESC, ASE_MT;
78
79   def FORK : FORK_ENC, FORK_DESC, ASE_MT;
80
81   def YIELD : YIELD_ENC, YIELD_DESC, ASE_MT;
82 }
83
84 //===----------------------------------------------------------------------===//
85 // MIPS MT Instruction Definitions
86 //===----------------------------------------------------------------------===//
87
88 let AdditionalPredicates = [NotInMicroMips] in {
89   def : MipsInstAlias<"dmt", (DMT ZERO), 1>, ASE_MT;
90
91   def : MipsInstAlias<"emt", (EMT ZERO), 1>, ASE_MT;
92
93   def : MipsInstAlias<"dvpe", (DVPE ZERO), 1>, ASE_MT;
94
95   def : MipsInstAlias<"evpe", (EVPE ZERO), 1>, ASE_MT;
96
97   def : MipsInstAlias<"yield $rs", (YIELD ZERO, GPR32Opnd:$rs), 1>, ASE_MT;
98 }