blob: 5cc3312083839680f96ac2f3ed2d63b38caae9e5 [file] [log] [blame]
Duraid Madina9b9d45f2005-03-17 18:17:03 +00001//===- IA64InstrInfo.td - Describe the IA64 Instruction Set -----*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by Duraid Madina and is distributed under the
6// University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file describes the IA64 instruction set, defining the instructions, and
11// properties of the instructions which are needed for code generation, machine
12// code emission, and analysis.
13//
14//===----------------------------------------------------------------------===//
15
16include "IA64InstrFormats.td"
17
18def u6imm : Operand<i8>;
Duraid Madina18c0c6b2005-04-07 12:32:24 +000019def s8imm : Operand<i8> {
20 let PrintMethod = "printS8ImmOperand";
21}
22def s14imm : Operand<i16> {
23 let PrintMethod = "printS14ImmOperand";
24}
Duraid Madina5ef2ec92005-04-11 05:55:56 +000025def s22imm : Operand<i32> {
26 let PrintMethod = "printS22ImmOperand";
Duraid Madina9b9d45f2005-03-17 18:17:03 +000027}
28def u64imm : Operand<i64> {
29 let PrintMethod = "printU64ImmOperand";
30}
31
32// the asmprinter needs to know about calls
33let PrintMethod = "printCallOperand" in
34 def calltarget : Operand<i64>;
35
36def PHI : PseudoInstIA64<(ops), "PHI">;
37def IDEF : PseudoInstIA64<(ops), "// IDEF">;
Duraid Madina09c61b92005-04-04 04:50:57 +000038def IUSE : PseudoInstIA64<(ops), "// IUSE">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +000039def WTF : PseudoInstIA64<(ops), "que??">;
40def ADJUSTCALLSTACKUP : PseudoInstIA64<(ops), "// ADJUSTCALLSTACKUP">;
41def ADJUSTCALLSTACKDOWN : PseudoInstIA64<(ops), "// ADJUSTCALLSTACKDOWN">;
42def PSEUDO_ALLOC : PseudoInstIA64<(ops), "// PSEUDO_ALLOC">;
43
44def ALLOC : AForm<0x03, 0x0b,
45 (ops GR:$dst, i8imm:$inputs, i8imm:$locals, i8imm:$outputs, i8imm:$rotating),
46 "alloc $dst = ar.pfs,$inputs,$locals,$outputs,$rotating;;">;
47
48def MOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "mov $dst = $src;;">;
49def PMOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src, PR:$qp),
50 "($qp) mov $dst = $src;;">;
51
52def SPILL_ALL_PREDICATES_TO_GR : AForm<0x03, 0x0b, (ops GR:$dst),
53 "mov $dst = pr;;">;
54def FILL_ALL_PREDICATES_FROM_GR : AForm<0x03, 0x0b, (ops GR:$src),
55 "mov pr = $src;;">;
56
57let isTwoAddress = 1 in {
58 def CMOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src2, GR:$src, PR:$qp),
59 "($qp) mov $dst = $src;;">;
60}
61
Duraid Madina291e1262005-03-31 07:32:32 +000062def PFMOV : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src, PR:$qp),
63 "($qp) mov $dst = $src;;">;
64
65let isTwoAddress = 1 in {
66 def CFMOV : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src2, FP:$src, PR:$qp),
67 "($qp) mov $dst = $src;;">;
68}
69
Duraid Madina9b9d45f2005-03-17 18:17:03 +000070let isTwoAddress = 1 in {
71 def TCMPNE : AForm<0x03, 0x0b,
72 (ops PR:$dst, PR:$src2, GR:$src3, GR:$src4),
73 "cmp.ne $dst, p0 = $src3, $src4;;">;
74
75 def TPCMPEQOR : AForm<0x03, 0x0b,
76 (ops PR:$dst, PR:$src2, GR:$src3, GR:$src4, PR:$qp),
77 "($qp) cmp.eq.or $dst, p0 = $src3, $src4;;">;
78
79 def TPCMPNE : AForm<0x03, 0x0b,
80 (ops PR:$dst, PR:$src2, GR:$src3, GR:$src4, PR:$qp),
81 "($qp) cmp.ne $dst, p0 = $src3, $src4;;">;
82
83 def TPCMPEQ : AForm<0x03, 0x0b,
84 (ops PR:$dst, PR:$src2, GR:$src3, GR:$src4, PR:$qp),
85 "($qp) cmp.eq $dst, p0 = $src3, $src4;;">;
86}
87
Duraid Madina5ef2ec92005-04-11 05:55:56 +000088def MOVSIMM14 : AForm<0x03, 0x0b, (ops GR:$dst, s14imm:$imm),
Duraid Madina9b9d45f2005-03-17 18:17:03 +000089 "mov $dst = $imm;;">;
Duraid Madina5ef2ec92005-04-11 05:55:56 +000090def MOVSIMM22 : AForm<0x03, 0x0b, (ops GR:$dst, s22imm:$imm),
91 "mov $dst = $imm;;">;
92def MOVLIMM64 : AForm<0x03, 0x0b, (ops GR:$dst, u64imm:$imm),
Duraid Madina9b9d45f2005-03-17 18:17:03 +000093 "movl $dst = $imm;;">;
94
95def AND : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
96 "and $dst = $src1, $src2;;">;
97def OR : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
98 "or $dst = $src1, $src2;;">;
99def XOR : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
100 "xor $dst = $src1, $src2;;">;
101def SHL : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
102 "shl $dst = $src1, $src2;;">;
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000103def SHLI : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm),
104 "shl $dst = $src1, $imm;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000105def SHRU : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
106 "shr.u $dst = $src1, $src2;;">;
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000107def SHRUI : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm),
Duraid Madina18c0c6b2005-04-07 12:32:24 +0000108 "shr.u $dst = $src1, $imm;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000109def SHRS : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
110 "shr $dst = $src1, $src2;;">;
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000111def SHRSI : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm),
Duraid Madina18c0c6b2005-04-07 12:32:24 +0000112 "shr $dst = $src1, $imm;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000113
Duraid Madinaed095022005-04-13 06:12:04 +0000114def SHLADD : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm, GR:$src2),
115 "shladd $dst = $src1, $imm, $src2;;">;
116
Duraid Madina6dcceb52005-04-08 10:01:48 +0000117def EXTRU : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm1, u6imm:$imm2),
118 "extr.u $dst = $src1, $imm1, $imm2;;">;
119
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000120def DEPZ : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm1, u6imm:$imm2), "dep.z $dst = $src1, $imm1, $imm2;;">;
121
122def SXT1 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "sxt1 $dst = $src;;">;
123def ZXT1 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "zxt1 $dst = $src;;">;
124def SXT2 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "sxt2 $dst = $src;;">;
125def ZXT2 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "zxt2 $dst = $src;;">;
126def SXT4 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "sxt4 $dst = $src;;">;
127def ZXT4 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "zxt4 $dst = $src;;">;
128
129// the following are all a bit unfortunate: we throw away the complement
130// of the compare!
131def CMPEQ : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
132 "cmp.eq $dst, p0 = $src1, $src2;;">;
133def CMPGT : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
134 "cmp.gt $dst, p0 = $src1, $src2;;">;
135def CMPGE : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
136 "cmp.ge $dst, p0 = $src1, $src2;;">;
137def CMPLT : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
138 "cmp.lt $dst, p0 = $src1, $src2;;">;
139def CMPLE : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
140 "cmp.le $dst, p0 = $src1, $src2;;">;
141def CMPNE : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
142 "cmp.ne $dst, p0 = $src1, $src2;;">;
143def CMPLTU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
144 "cmp.ltu $dst, p0 = $src1, $src2;;">;
145def CMPGTU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
146 "cmp.gtu $dst, p0 = $src1, $src2;;">;
147def CMPLEU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
148 "cmp.leu $dst, p0 = $src1, $src2;;">;
149def CMPGEU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
150 "cmp.geu $dst, p0 = $src1, $src2;;">;
151
152// and we do the whole thing again for FP compares!
153def FCMPEQ : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
154 "fcmp.eq $dst, p0 = $src1, $src2;;">;
155def FCMPGT : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
156 "fcmp.gt $dst, p0 = $src1, $src2;;">;
157def FCMPGE : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
158 "fcmp.ge $dst, p0 = $src1, $src2;;">;
159def FCMPLT : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
160 "fcmp.lt $dst, p0 = $src1, $src2;;">;
161def FCMPLE : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
162 "fcmp.le $dst, p0 = $src1, $src2;;">;
163def FCMPNE : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
164 "fcmp.neq $dst, p0 = $src1, $src2;;">;
165def FCMPLTU : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
166 "fcmp.ltu $dst, p0 = $src1, $src2;;">;
167def FCMPGTU : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
168 "fcmp.gtu $dst, p0 = $src1, $src2;;">;
169def FCMPLEU : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
170 "fcmp.leu $dst, p0 = $src1, $src2;;">;
171def FCMPGEU : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
172 "fcmp.geu $dst, p0 = $src1, $src2;;">;
173
174def PCMPEQOR : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2, PR:$qp),
175 "($qp) cmp.eq.or $dst, p0 = $src1, $src2;;">;
176def PCMPEQUNC : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2, PR:$qp),
177 "($qp) cmp.eq.unc $dst, p0 = $src1, $src2;;">;
178def PCMPNE : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2, PR:$qp),
179 "($qp) cmp.ne $dst, p0 = $src1, $src2;;">;
180
181// two destinations!
182def BCMPEQ : AForm<0x03, 0x0b, (ops PR:$dst1, PR:$dst2, GR:$src1, GR:$src2),
183 "cmp.eq $dst1, dst2 = $src1, $src2;;">;
184
185def ADD : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
186 "add $dst = $src1, $src2;;">;
Duraid Madina18c0c6b2005-04-07 12:32:24 +0000187def ADDIMM14 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, s14imm:$imm),
188 "adds $dst = $imm, $src1;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000189
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000190def ADDIMM22 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, s22imm:$imm),
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000191 "add $dst = $imm, $src1;;">;
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000192def CADDIMM22 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, s22imm:$imm, PR:$qp),
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000193 "($qp) add $dst = $imm, $src1;;">;
194
195let isTwoAddress = 1 in {
196def TPCADDIMM22 : AForm<0x03, 0x0b,
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000197 (ops GR:$dst, GR:$src1, s22imm:$imm, PR:$qp),
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000198 "($qp) add $dst = $imm, $dst;;">;
199def TPCMPIMM8NE : AForm<0x03, 0x0b,
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000200 (ops PR:$dst, PR:$src1, s22imm:$imm, GR:$src2, PR:$qp),
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000201 "($qp) cmp.ne $dst , p0 = $imm, $src2;;">;
202}
203
204def SUB : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
205 "sub $dst = $src1, $src2;;">;
Duraid Madina18c0c6b2005-04-07 12:32:24 +0000206def SUBIMM8 : AForm<0x03, 0x0b, (ops GR:$dst, s8imm:$imm, GR:$src2),
207 "sub $dst = $imm, $src2;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000208
209def ST1 : AForm<0x03, 0x0b, (ops GR:$dstPtr, GR:$value),
210 "st1 [$dstPtr] = $value;;">;
211def ST2 : AForm<0x03, 0x0b, (ops GR:$dstPtr, GR:$value),
212 "st2 [$dstPtr] = $value;;">;
213def ST4 : AForm<0x03, 0x0b, (ops GR:$dstPtr, GR:$value),
214 "st4 [$dstPtr] = $value;;">;
215def ST8 : AForm<0x03, 0x0b, (ops GR:$dstPtr, GR:$value),
216 "st8 [$dstPtr] = $value;;">;
217
218def LD1 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$srcPtr),
219 "ld1 $dst = [$srcPtr];;">;
220def LD2 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$srcPtr),
221 "ld2 $dst = [$srcPtr];;">;
222def LD4 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$srcPtr),
223 "ld4 $dst = [$srcPtr];;">;
224def LD8 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$srcPtr),
225 "ld8 $dst = [$srcPtr];;">;
226
227// some FP stuff:
228def FADD : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2),
229 "fadd $dst = $src1, $src2;;">;
230def FADDS: AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2),
231 "fadd.s $dst = $src1, $src2;;">;
232def FSUB : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2),
233 "fsub $dst = $src1, $src2;;">;
234def FMPY : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2),
235 "fmpy $dst = $src1, $src2;;">;
236def FMOV : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
237 "mov $dst = $src;;">; // XXX: there _is_ no fmov
238def FMA : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3),
239 "fma $dst = $src1, $src2, $src3;;">;
Duraid Madinab366a022005-04-06 09:54:09 +0000240def FMS : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3),
241 "fms $dst = $src1, $src2, $src3;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000242def FNMA : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3),
243 "fnma $dst = $src1, $src2, $src3;;">;
Duraid Madinaa7ee8b82005-04-02 05:18:38 +0000244def FABS : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
245 "fabs $dst = $src;;">;
246def FNEG : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
247 "fneg $dst = $src;;">;
Duraid Madina5c156b72005-04-02 10:06:27 +0000248def FNEGABS : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
249 "fnegabs $dst = $src;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000250
251def CFMAS1 : AForm<0x03, 0x0b,
252 (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3, PR:$qp),
253 "($qp) fma.s1 $dst = $src1, $src2, $src3;;">;
254def CFNMAS1 : AForm<0x03, 0x0b,
255 (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3, PR:$qp),
256 "($qp) fnma.s1 $dst = $src1, $src2, $src3;;">;
257
Duraid Madina6dcceb52005-04-08 10:01:48 +0000258def FRCPAS1 : AForm<0x03, 0x0b, (ops FP:$dstFR, PR:$dstPR, FP:$src1, FP:$src2),
259 "frcpa.s1 $dstFR, $dstPR = $src1, $src2;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000260
261def XMAL : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3),
262 "xma.l $dst = $src1, $src2, $src3;;">;
263
264def FCVTXF : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
265 "fcvt.xf $dst = $src;;">;
266def FCVTXUF : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
267 "fcvt.xuf $dst = $src;;">;
268def FCVTXUFS1 : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
269 "fcvt.xuf.s1 $dst = $src;;">;
270def FCVTFX : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
271 "fcvt.fx $dst = $src;;">;
272def FCVTFXU : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
273 "fcvt.fxu $dst = $src;;">;
274
275def FCVTFXTRUNC : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
276 "fcvt.fx.trunc $dst = $src;;">;
277def FCVTFXUTRUNC : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
278 "fcvt.fxu.trunc $dst = $src;;">;
279
280def FCVTFXTRUNCS1 : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
281 "fcvt.fx.trunc.s1 $dst = $src;;">;
282def FCVTFXUTRUNCS1 : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
283 "fcvt.fxu.trunc.s1 $dst = $src;;">;
284
285def FNORMD : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
286 "fnorm.d $dst = $src;;">;
287
288def GETFD : AForm<0x03, 0x0b, (ops GR:$dst, FP:$src),
289 "getf.d $dst = $src;;">;
290def SETFD : AForm<0x03, 0x0b, (ops FP:$dst, GR:$src),
291 "setf.d $dst = $src;;">;
292
293def GETFSIG : AForm<0x03, 0x0b, (ops GR:$dst, FP:$src),
294 "getf.sig $dst = $src;;">;
295def SETFSIG : AForm<0x03, 0x0b, (ops FP:$dst, GR:$src),
296 "setf.sig $dst = $src;;">;
297
298def LDF4 : AForm<0x03, 0x0b, (ops FP:$dst, GR:$srcPtr),
299 "ldfs $dst = [$srcPtr];;">;
300def LDF8 : AForm<0x03, 0x0b, (ops FP:$dst, GR:$srcPtr),
301 "ldfd $dst = [$srcPtr];;">;
302
303def STF4 : AForm<0x03, 0x0b, (ops GR:$dstPtr, FP:$value),
304 "stfs [$dstPtr] = $value;;">;
305def STF8 : AForm<0x03, 0x0b, (ops GR:$dstPtr, FP:$value),
306 "stfd [$dstPtr] = $value;;">;
307
308let isTerminator = 1, isBranch = 1 in {
309 def BRLCOND_NOTCALL : RawForm<0x03, 0xb0, (ops PR:$qp, i64imm:$dst),
310 "($qp) brl.cond.sptk $dst;;">;
311 def BRCOND_NOTCALL : RawForm<0x03, 0xb0, (ops PR:$qp, GR:$dst),
312 "($qp) br.cond.sptk $dst;;">;
313}
314
315let isCall = 1, isTerminator = 1, isBranch = 1,
Chris Lattnerea6f7702005-04-12 15:12:19 +0000316 Uses = [out0,out1,out2,out3,out4,out5,out6,out7],
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000317// all calls clobber non-callee-saved registers, and for now, they are these:
318 Defs = [r2,r3,r8,r9,r10,r11,r14,r15,r16,r17,r18,r19,r20,r21,r22,r23,r24,
319 r25,r26,r27,r28,r29,r30,r31,
320 p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,
321 F6,F7,F8,F9,F10,F11,F12,F13,F14,F15,
322 F32,F33,F34,F35,F36,F37,F38,F39,F40,F41,F42,F43,F44,F45,F46,F47,F48,F49,
323 F50,F51,F52,F53,F54,F55,F56,
324 F57,F58,F59,F60,F61,F62,F63,F64,F65,F66,F67,F68,F69,F70,F71,F72,F73,F74,
325 F75,F76,F77,F78,F79,F80,F81,
326 F82,F83,F84,F85,F86,F87,F88,F89,F90,F91,F92,F93,F94,F95,F96,F97,F98,F99,
327 F100,F101,F102,F103,F104,F105,
328 F106,F107,F108,F109,F110,F111,F112,F113,F114,F115,F116,F117,F118,F119,
329 F120,F121,F122,F123,F124,F125,F126,F127,
330 out0,out1,out2,out3,out4,out5,out6,out7] in {
331 def BRCALL : RawForm<0x03, 0xb0, (ops calltarget:$dst),
332 "br.call.sptk rp = $dst;;">; // FIXME: teach llvm about branch regs?
333 def BRLCOND_CALL : RawForm<0x03, 0xb0, (ops PR:$qp, i64imm:$dst),
334 "($qp) brl.cond.call.sptk $dst;;">;
335 def BRCOND_CALL : RawForm<0x03, 0xb0, (ops PR:$qp, GR:$dst),
336 "($qp) br.cond.call.sptk $dst;;">;
337}
338
339let isTerminator = 1, isReturn = 1 in
340 def RET : RawForm<0x03, 0xb0, (ops), "br.ret.sptk.many rp;;">; // return
341
342