5eb4ff1d7f92b4b350af37456bec9b83b4bc44d4
[oota-llvm.git] / lib / Target / XCore / XCoreInstrFormats.td
1 //===-- XCoreInstrFormats.td - XCore 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 //===----------------------------------------------------------------------===//
11 // Instruction format superclass
12 //===----------------------------------------------------------------------===//
13 class InstXCore<int sz, dag outs, dag ins, string asmstr, list<dag> pattern>
14     : Instruction {
15   field bits<32> Inst;
16
17   let Namespace = "XCore";
18   dag OutOperandList = outs;
19   dag InOperandList = ins;
20   let AsmString   = asmstr;
21   let Pattern = pattern;
22   let Size = sz;
23 }
24
25 // XCore pseudo instructions format
26 class PseudoInstXCore<dag outs, dag ins, string asmstr, list<dag> pattern>
27    : InstXCore<0, outs, ins, asmstr, pattern>;
28
29 //===----------------------------------------------------------------------===//
30 // Instruction formats
31 //===----------------------------------------------------------------------===//
32
33 class _F3R<dag outs, dag ins, string asmstr, list<dag> pattern>
34     : InstXCore<2, outs, ins, asmstr, pattern> {
35   let Inst{31-0} = 0;
36 }
37
38 class _FL3R<dag outs, dag ins, string asmstr, list<dag> pattern>
39     : InstXCore<4, outs, ins, asmstr, pattern> {
40   let Inst{31-0} = 0;
41 }
42
43 class _F2RUS<dag outs, dag ins, string asmstr, list<dag> pattern>
44     : InstXCore<2, outs, ins, asmstr, pattern> {
45   let Inst{31-0} = 0;
46 }
47
48 class _FL2RUS<dag outs, dag ins, string asmstr, list<dag> pattern>
49     : InstXCore<4, outs, ins, asmstr, pattern> {
50   let Inst{31-0} = 0;
51 }
52
53 class _FRU6<dag outs, dag ins, string asmstr, list<dag> pattern>
54     : InstXCore<2, outs, ins, asmstr, pattern> {
55   let Inst{31-0} = 0;
56 }
57
58 class _FLRU6<dag outs, dag ins, string asmstr, list<dag> pattern>
59     : InstXCore<4, outs, ins, asmstr, pattern> {
60   let Inst{31-0} = 0;
61 }
62
63 class _FU6<dag outs, dag ins, string asmstr, list<dag> pattern>
64     : InstXCore<2, outs, ins, asmstr, pattern> {
65   let Inst{31-0} = 0;
66 }
67
68 class _FLU6<dag outs, dag ins, string asmstr, list<dag> pattern>
69     : InstXCore<4, outs, ins, asmstr, pattern> {
70   let Inst{31-0} = 0;
71 }
72
73 class _FU10<dag outs, dag ins, string asmstr, list<dag> pattern>
74     : InstXCore<2, outs, ins, asmstr, pattern> {
75   let Inst{31-0} = 0;
76 }
77
78 class _FLU10<dag outs, dag ins, string asmstr, list<dag> pattern>
79     : InstXCore<4, outs, ins, asmstr, pattern> {
80   let Inst{31-0} = 0;
81 }
82
83 class _F2R<dag outs, dag ins, string asmstr, list<dag> pattern>
84     : InstXCore<2, outs, ins, asmstr, pattern> {
85   let Inst{31-0} = 0;
86 }
87
88 class _FRUS<dag outs, dag ins, string asmstr, list<dag> pattern>
89     : InstXCore<2, outs, ins, asmstr, pattern> {
90   let Inst{31-0} = 0;
91 }
92
93 class _FL2R<dag outs, dag ins, string asmstr, list<dag> pattern>
94     : InstXCore<4, outs, ins, asmstr, pattern> {
95   let Inst{31-0} = 0;
96 }
97
98 class _F1R<dag outs, dag ins, string asmstr, list<dag> pattern>
99     : InstXCore<2, outs, ins, asmstr, pattern> {
100   let Inst{31-0} = 0;
101 }
102
103 class _F0R<dag outs, dag ins, string asmstr, list<dag> pattern>
104     : InstXCore<2, outs, ins, asmstr, pattern> {
105   let Inst{31-0} = 0;
106 }
107
108 class _L4R<dag outs, dag ins, string asmstr, list<dag> pattern>
109     : InstXCore<4, outs, ins, asmstr, pattern> {
110   let Inst{31-0} = 0;
111 }
112
113 class _L5R<dag outs, dag ins, string asmstr, list<dag> pattern>
114     : InstXCore<4, outs, ins, asmstr, pattern> {
115   let Inst{31-0} = 0;
116 }
117
118 class _L6R<dag outs, dag ins, string asmstr, list<dag> pattern>
119     : InstXCore<4, outs, ins, asmstr, pattern> {
120   let Inst{31-0} = 0;
121 }