[Mips][msa] Added initial MSA support.
[oota-llvm.git] / lib / Target / Mips / MipsMSAInstrFormats.td
1 //===- MipsMSAInstrFormats.td - Mips Instruction Formats ---*- 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 def HasMSA : Predicate<"Subtarget.hasMSA()">,
11              AssemblerPredicate<"FeatureMSA">;
12
13 class MSAInst : MipsInst<(outs), (ins), "", [], NoItinerary, FrmOther> {
14   let Predicates = [HasMSA];
15   let Inst{31-26} = 0b011110;
16 }
17
18 class PseudoMSA<dag outs, dag ins, list<dag> pattern,
19                 InstrItinClass itin = IIPseudo>:
20   MipsPseudo<outs, ins, pattern, itin> {
21   let Predicates = [HasMSA];
22 }
23
24 class MSA_3R_FMT<bits<3> major, bits<2> df, bits<6> minor>: MSAInst {
25   let Inst{25-23} = major;
26   let Inst{22-21} = df;
27   let Inst{5-0} = minor;
28 }
29
30 class MSA_I5_FMT<bits<3> major, bits<2> df, bits<6> minor>: MSAInst {
31   let Inst{25-23} = major;
32   let Inst{22-21} = df;
33   let Inst{5-0} = minor;
34 }