1 //=- Mips32r6InstrFormats.td - Mips32r6 Instruction Formats -*- 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 // This file describes Mips32r6 instruction formats.
12 //===----------------------------------------------------------------------===//
14 class MipsR6Inst : MipsInst<(outs), (ins), "", [], NoItinerary, FrmOther>,
16 let DecoderNamespace = "Mips32r6_64r6";
17 let EncodingPredicates = [HasStdEnc];
20 //===----------------------------------------------------------------------===//
24 //===----------------------------------------------------------------------===//
26 def OPGROUP_COP1 { bits<6> Value = 0b010001; }
27 def OPGROUP_AUI { bits<6> Value = 0b001111; }
28 def OPGROUP_DAUI { bits<6> Value = 0b011101; }
29 def OPGROUP_REGIMM { bits<6> Value = 0b000001; }
30 def OPGROUP_SPECIAL { bits<6> Value = 0b000000; }
32 class OPCODE5<bits<5> Val> {
35 def OPCODE5_DAHI : OPCODE5<0b00110>;
36 def OPCODE5_DATI : OPCODE5<0b11110>;
38 class FIELD_FMT<bits<5> Val> {
41 def FIELD_FMT_S : FIELD_FMT<0b10000>;
42 def FIELD_FMT_D : FIELD_FMT<0b10001>;
44 //===----------------------------------------------------------------------===//
48 //===----------------------------------------------------------------------===//
50 class AUI_FM : MipsR6Inst {
57 let Inst{31-26} = OPGROUP_AUI.Value;
63 class DAUI_FM : AUI_FM {
64 let Inst{31-26} = OPGROUP_DAUI.Value;
67 class COP1_3R_FM<bits<6> funct, FIELD_FMT Format> : MipsR6Inst {
74 let Inst{31-26} = OPGROUP_COP1.Value;
75 let Inst{25-21} = Format.Value;
79 let Inst{5-0} = funct;
82 class SPECIAL_3R_FM<bits<5> mulop, bits<6> funct> : MipsR6Inst {
89 let Inst{31-26} = OPGROUP_SPECIAL.Value;
93 let Inst{10-6} = mulop;
94 let Inst{5-0} = funct;
97 class REGIMM_FM<OPCODE5 Operation> : MipsR6Inst {
103 let Inst{31-26} = OPGROUP_REGIMM.Value;
104 let Inst{25-21} = rs;
105 let Inst{20-16} = Operation.Value;
106 let Inst{15-0} = imm;