Use std::is_sorted to replace a custom version. Also replace a comparison predicate...
[oota-llvm.git] / lib / Target / Mips / MicroMipsDSPInstrFormats.td
1 //===-- MicroMipsDSPInstrFormats.td - 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 class MMDSPInst<string opstr = "">
11     : MipsInst<(outs), (ins), "", [], NoItinerary, FrmOther>, PredicateControl {
12   let InsnPredicates = [HasDSP];
13   let AdditionalPredicates = [InMicroMips];
14   string BaseOpcode = opstr;
15   string Arch = "mmdsp";
16   let DecoderNamespace = "MicroMips";
17 }
18
19 class POOL32A_3R_FMT<string opstr, bits<11> op> : MMDSPInst<opstr> {
20   bits<5> rd;
21   bits<5> rs;
22   bits<5> rt;
23
24   let Inst{31-26} = 0b000000;
25   let Inst{25-21} = rt;
26   let Inst{20-16} = rs;
27   let Inst{15-11} = rd;
28   let Inst{10-0}  = op;
29 }
30
31 class POOL32A_AC2R_FMT<string opstr, bits<8> funct> : MMDSPInst<opstr> {
32   bits<2> ac;
33   bits<5> rs;
34   bits<5> rt;
35
36   let Inst{31-26} = 0;
37   let Inst{25-21} = rt;
38   let Inst{20-16} = rs;
39   let Inst{15-14} = ac;
40   let Inst{13-6} = funct;
41   let Inst{5-0} = 0b111100;
42 }