MicroMipsInstrFormats.td revision f530aff9de2738db0e3471b259ff0b577a6603e6
1class MMArch {
2  string Arch = "micromips";
3  list<dag> Pattern = [];
4}
5
6class ADD_FM_MM<bits<6> op, bits<10> funct> : MMArch {
7  bits<5> rt;
8  bits<5> rs;
9  bits<5> rd;
10
11  bits<32> Inst;
12
13  let Inst{31-26} = op;
14  let Inst{25-21} = rt;
15  let Inst{20-16} = rs;
16  let Inst{15-11} = rd;
17  let Inst{10}    = 0;
18  let Inst{9-0}   = funct;
19}
20
21class ADDI_FM_MM<bits<6> op> : MMArch {
22  bits<5>  rs;
23  bits<5>  rt;
24  bits<16> imm16;
25
26  bits<32> Inst;
27
28  let Inst{31-26} = op;
29  let Inst{25-21} = rt;
30  let Inst{20-16} = rs;
31  let Inst{15-0}  = imm16;
32}
33
34class SLTI_FM_MM<bits<6> op> : MMArch {
35  bits<5> rt;
36  bits<5> rs;
37  bits<16> imm16;
38
39  bits<32> Inst;
40
41  let Inst{31-26} = op;
42  let Inst{25-21} = rs;
43  let Inst{20-16} = rt;
44  let Inst{15-0}  = imm16;
45}
46
47class LUI_FM_MM : MMArch {
48  bits<5> rt;
49  bits<16> imm16;
50
51  bits<32> Inst;
52
53  let Inst{31-26} = 0x10;
54  let Inst{25-21} = 0xd;
55  let Inst{20-16} = rt;
56  let Inst{15-0}  = imm16;
57}
58
59class MULT_FM_MM<bits<10> funct> : MMArch {
60  bits<5>  rs;
61  bits<5>  rt;
62
63  bits<32> Inst;
64
65  let Inst{31-26} = 0x00;
66  let Inst{25-21} = rt;
67  let Inst{20-16} = rs;
68  let Inst{15-6}  = funct;
69  let Inst{5-0}   = 0x3c;
70}
71