Reverting the commit 116986. It was breaking the build on llvm-x86_64-linux though it
[oota-llvm.git] / lib / Target / MBlaze / MBlazeInstrFSL.td
1 //===- MBlazeInstrFSL.td - MBlaze FSL Instruction defs -----*- 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 // FSL Instruction Formats
12 //===----------------------------------------------------------------------===//
13 class FSLGetD<bits<6> op, bits<11> flags, string instr_asm, Intrinsic OpNode> :
14               TA<op, flags, (outs CPURegs:$dst), (ins CPURegs:$b),
15                  !strconcat(instr_asm, " $dst, $b"),
16                  [(set CPURegs:$dst, (OpNode CPURegs:$b))], IIAlu>;
17
18 class FSLGet<bits<6> op, string instr_asm, Intrinsic OpNode> :
19              TAI<op, (outs CPURegs:$dst), (ins fslimm:$b),
20                  !strconcat(instr_asm, " $dst, $b"),
21                  [(set CPURegs:$dst, (OpNode immZExt4:$b))], IIAlu>;
22
23 class FSLPutD<bits<6> op, bits<11> flags, string instr_asm, Intrinsic OpNode> :
24               TA<op, flags, (outs), (ins CPURegs:$v, CPURegs:$b),
25                  !strconcat(instr_asm, " $v, $b"),
26                  [(OpNode CPURegs:$v, CPURegs:$b)], IIAlu>;
27
28 class FSLPut<bits<6> op, string instr_asm, Intrinsic OpNode> :
29              TAI<op, (outs), (ins CPURegs:$v, fslimm:$b),
30                  !strconcat(instr_asm, " $v, $b"),
31                  [(OpNode CPURegs:$v, immZExt4:$b)], IIAlu>;
32
33 class FSLPutTD<bits<6> op, bits<11> flags, string instr_asm, Intrinsic OpNode> :
34                TA<op, flags, (outs), (ins CPURegs:$b),
35                   !strconcat(instr_asm, " $b"),
36                   [(OpNode CPURegs:$b)], IIAlu>;
37
38 class FSLPutT<bits<6> op, string instr_asm, Intrinsic OpNode> :
39               TAI<op, (outs), (ins fslimm:$b),
40                   !strconcat(instr_asm, " $b"),
41                   [(OpNode immZExt4:$b)], IIAlu>;
42
43 //===----------------------------------------------------------------------===//
44 // FSL Get Instructions
45 //===----------------------------------------------------------------------===//
46 def GET      : FSLGet<0x1B, "get      ", int_mblaze_fsl_get>;
47 def AGET     : FSLGet<0x1B, "aget     ", int_mblaze_fsl_aget>;
48 def CGET     : FSLGet<0x1B, "cget     ", int_mblaze_fsl_cget>;
49 def CAGET    : FSLGet<0x1B, "caget    ", int_mblaze_fsl_caget>;
50 def EGET     : FSLGet<0x1B, "eget     ", int_mblaze_fsl_eget>;
51 def EAGET    : FSLGet<0x1B, "eaget    ", int_mblaze_fsl_eaget>;
52 def ECGET    : FSLGet<0x1B, "ecget    ", int_mblaze_fsl_ecget>;
53 def ECAGET   : FSLGet<0x1B, "ecaget   ", int_mblaze_fsl_ecaget>;
54 def NGET     : FSLGet<0x1B, "nget     ", int_mblaze_fsl_nget>;
55 def NAGET    : FSLGet<0x1B, "naget    ", int_mblaze_fsl_naget>;
56 def NCGET    : FSLGet<0x1B, "ncget    ", int_mblaze_fsl_ncget>;
57 def NCAGET   : FSLGet<0x1B, "ncaget   ", int_mblaze_fsl_ncaget>;
58 def NEGET    : FSLGet<0x1B, "neget    ", int_mblaze_fsl_neget>;
59 def NEAGET   : FSLGet<0x1B, "neaget   ", int_mblaze_fsl_neaget>;
60 def NECGET   : FSLGet<0x1B, "necget   ", int_mblaze_fsl_necget>;
61 def NECAGET  : FSLGet<0x1B, "necaget  ", int_mblaze_fsl_necaget>;
62 def TGET     : FSLGet<0x1B, "tget     ", int_mblaze_fsl_tget>;
63 def TAGET    : FSLGet<0x1B, "taget    ", int_mblaze_fsl_taget>;
64 def TCGET    : FSLGet<0x1B, "tcget    ", int_mblaze_fsl_tcget>;
65 def TCAGET   : FSLGet<0x1B, "tcaget   ", int_mblaze_fsl_tcaget>;
66 def TEGET    : FSLGet<0x1B, "teget    ", int_mblaze_fsl_teget>;
67 def TEAGET   : FSLGet<0x1B, "teaget   ", int_mblaze_fsl_teaget>;
68 def TECGET   : FSLGet<0x1B, "tecget   ", int_mblaze_fsl_tecget>;
69 def TECAGET  : FSLGet<0x1B, "tecaget  ", int_mblaze_fsl_tecaget>;
70 def TNGET    : FSLGet<0x1B, "tnget    ", int_mblaze_fsl_tnget>;
71 def TNAGET   : FSLGet<0x1B, "tnaget   ", int_mblaze_fsl_tnaget>;
72 def TNCGET   : FSLGet<0x1B, "tncget   ", int_mblaze_fsl_tncget>;
73 def TNCAGET  : FSLGet<0x1B, "tncaget  ", int_mblaze_fsl_tncaget>;
74 def TNEGET   : FSLGet<0x1B, "tneget   ", int_mblaze_fsl_tneget>;
75 def TNEAGET  : FSLGet<0x1B, "tneaget  ", int_mblaze_fsl_tneaget>;
76 def TNECGET  : FSLGet<0x1B, "tnecget  ", int_mblaze_fsl_tnecget>;
77 def TNECAGET : FSLGet<0x1B, "tnecaget ", int_mblaze_fsl_tnecaget>;
78
79 //===----------------------------------------------------------------------===//
80 // FSL Dynamic Get Instructions
81 //===----------------------------------------------------------------------===//
82 def GETD      : FSLGetD<0x1B, 0x00, "getd     ", int_mblaze_fsl_get>;
83 def AGETD     : FSLGetD<0x1B, 0x00, "agetd    ", int_mblaze_fsl_aget>;
84 def CGETD     : FSLGetD<0x1B, 0x00, "cgetd    ", int_mblaze_fsl_cget>;
85 def CAGETD    : FSLGetD<0x1B, 0x00, "cagetd   ", int_mblaze_fsl_caget>;
86 def EGETD     : FSLGetD<0x1B, 0x00, "egetd    ", int_mblaze_fsl_eget>;
87 def EAGETD    : FSLGetD<0x1B, 0x00, "eagetd   ", int_mblaze_fsl_eaget>;
88 def ECGETD    : FSLGetD<0x1B, 0x00, "ecgetd   ", int_mblaze_fsl_ecget>;
89 def ECAGETD   : FSLGetD<0x1B, 0x00, "ecagetd  ", int_mblaze_fsl_ecaget>;
90 def NGETD     : FSLGetD<0x1B, 0x00, "ngetd    ", int_mblaze_fsl_nget>;
91 def NAGETD    : FSLGetD<0x1B, 0x00, "nagetd   ", int_mblaze_fsl_naget>;
92 def NCGETD    : FSLGetD<0x1B, 0x00, "ncgetd   ", int_mblaze_fsl_ncget>;
93 def NCAGETD   : FSLGetD<0x1B, 0x00, "ncagetd  ", int_mblaze_fsl_ncaget>;
94 def NEGETD    : FSLGetD<0x1B, 0x00, "negetd   ", int_mblaze_fsl_neget>;
95 def NEAGETD   : FSLGetD<0x1B, 0x00, "neagetd  ", int_mblaze_fsl_neaget>;
96 def NECGETD   : FSLGetD<0x1B, 0x00, "necgetd  ", int_mblaze_fsl_necget>;
97 def NECAGETD  : FSLGetD<0x1B, 0x00, "necagetd ", int_mblaze_fsl_necaget>;
98 def TGETD     : FSLGetD<0x1B, 0x00, "tgetd    ", int_mblaze_fsl_tget>;
99 def TAGETD    : FSLGetD<0x1B, 0x00, "tagetd   ", int_mblaze_fsl_taget>;
100 def TCGETD    : FSLGetD<0x1B, 0x00, "tcgetd   ", int_mblaze_fsl_tcget>;
101 def TCAGETD   : FSLGetD<0x1B, 0x00, "tcagetd  ", int_mblaze_fsl_tcaget>;
102 def TEGETD    : FSLGetD<0x1B, 0x00, "tegetd   ", int_mblaze_fsl_teget>;
103 def TEAGETD   : FSLGetD<0x1B, 0x00, "teagetd  ", int_mblaze_fsl_teaget>;
104 def TECGETD   : FSLGetD<0x1B, 0x00, "tecgetd  ", int_mblaze_fsl_tecget>;
105 def TECAGETD  : FSLGetD<0x1B, 0x00, "tecagetd ", int_mblaze_fsl_tecaget>;
106 def TNGETD    : FSLGetD<0x1B, 0x00, "tngetd   ", int_mblaze_fsl_tnget>;
107 def TNAGETD   : FSLGetD<0x1B, 0x00, "tnagetd  ", int_mblaze_fsl_tnaget>;
108 def TNCGETD   : FSLGetD<0x1B, 0x00, "tncgetd  ", int_mblaze_fsl_tncget>;
109 def TNCAGETD  : FSLGetD<0x1B, 0x00, "tncagetd ", int_mblaze_fsl_tncaget>;
110 def TNEGETD   : FSLGetD<0x1B, 0x00, "tnegetd  ", int_mblaze_fsl_tneget>;
111 def TNEAGETD  : FSLGetD<0x1B, 0x00, "tneagetd ", int_mblaze_fsl_tneaget>;
112 def TNECGETD  : FSLGetD<0x1B, 0x00, "tnecgetd ", int_mblaze_fsl_tnecget>;
113 def TNECAGETD : FSLGetD<0x1B, 0x00, "tnecagetd", int_mblaze_fsl_tnecaget>;
114
115 //===----------------------------------------------------------------------===//
116 // FSL Put Instructions
117 //===----------------------------------------------------------------------===//
118 def PUT     :  FSLPut<0x1B, "put      ", int_mblaze_fsl_put>;
119 def APUT    :  FSLPut<0x1B, "aput     ", int_mblaze_fsl_aput>;
120 def CPUT    :  FSLPut<0x1B, "cput     ", int_mblaze_fsl_cput>;
121 def CAPUT   :  FSLPut<0x1B, "caput    ", int_mblaze_fsl_caput>;
122 def NPUT    :  FSLPut<0x1B, "nput     ", int_mblaze_fsl_nput>;
123 def NAPUT   :  FSLPut<0x1B, "naput    ", int_mblaze_fsl_naput>;
124 def NCPUT   :  FSLPut<0x1B, "ncput    ", int_mblaze_fsl_ncput>;
125 def NCAPUT  :  FSLPut<0x1B, "ncaput   ", int_mblaze_fsl_ncaput>;
126 def TPUT    : FSLPutT<0x1B, "tput     ", int_mblaze_fsl_tput>;
127 def TAPUT   : FSLPutT<0x1B, "taput    ", int_mblaze_fsl_taput>;
128 def TCPUT   : FSLPutT<0x1B, "tcput    ", int_mblaze_fsl_tcput>;
129 def TCAPUT  : FSLPutT<0x1B, "tcaput   ", int_mblaze_fsl_tcaput>;
130 def TNPUT   : FSLPutT<0x1B, "tnput    ", int_mblaze_fsl_tnput>;
131 def TNAPUT  : FSLPutT<0x1B, "tnaput   ", int_mblaze_fsl_tnaput>;
132 def TNCPUT  : FSLPutT<0x1B, "tncput   ", int_mblaze_fsl_tncput>;
133 def TNCAPUT : FSLPutT<0x1B, "tncaput  ", int_mblaze_fsl_tncaput>;
134
135 //===----------------------------------------------------------------------===//
136 // FSL Dynamic Put Instructions
137 //===----------------------------------------------------------------------===//
138 def PUTD     :  FSLPutD<0x1B, 0x00, "putd     ", int_mblaze_fsl_put>;
139 def APUTD    :  FSLPutD<0x1B, 0x00, "aputd    ", int_mblaze_fsl_aput>;
140 def CPUTD    :  FSLPutD<0x1B, 0x00, "cputd    ", int_mblaze_fsl_cput>;
141 def CAPUTD   :  FSLPutD<0x1B, 0x00, "caputd   ", int_mblaze_fsl_caput>;
142 def NPUTD    :  FSLPutD<0x1B, 0x00, "nputd    ", int_mblaze_fsl_nput>;
143 def NAPUTD   :  FSLPutD<0x1B, 0x00, "naputd   ", int_mblaze_fsl_naput>;
144 def NCPUTD   :  FSLPutD<0x1B, 0x00, "ncputd   ", int_mblaze_fsl_ncput>;
145 def NCAPUTD  :  FSLPutD<0x1B, 0x00, "ncaputd  ", int_mblaze_fsl_ncaput>;
146 def TPUTD    : FSLPutTD<0x1B, 0x00, "tputd    ", int_mblaze_fsl_tput>;
147 def TAPUTD   : FSLPutTD<0x1B, 0x00, "taputd   ", int_mblaze_fsl_taput>;
148 def TCPUTD   : FSLPutTD<0x1B, 0x00, "tcputd   ", int_mblaze_fsl_tcput>;
149 def TCAPUTD  : FSLPutTD<0x1B, 0x00, "tcaputd  ", int_mblaze_fsl_tcaput>;
150 def TNPUTD   : FSLPutTD<0x1B, 0x00, "tnputd   ", int_mblaze_fsl_tnput>;
151 def TNAPUTD  : FSLPutTD<0x1B, 0x00, "tnaputd  ", int_mblaze_fsl_tnaput>;
152 def TNCPUTD  : FSLPutTD<0x1B, 0x00, "tncputd  ", int_mblaze_fsl_tncput>;
153 def TNCAPUTD : FSLPutTD<0x1B, 0x00, "tncaputd ", int_mblaze_fsl_tncaput>;