blob: 52d817a5eb3504c7b422a462e4d3df56eb92378a [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}
Duraid Madina1ce0c012005-04-14 10:08:01 +000031def s64imm : Operand<i64> {
32 let PrintMethod = "printS64ImmOperand";
33}
Duraid Madina9b9d45f2005-03-17 18:17:03 +000034
35// the asmprinter needs to know about calls
36let PrintMethod = "printCallOperand" in
37 def calltarget : Operand<i64>;
38
Chris Lattnerefc58be2005-08-19 00:47:42 +000039def PHI : PseudoInstIA64<(ops variable_ops), "PHI">;
40def IDEF : PseudoInstIA64<(ops variable_ops), "// IDEF">;
41def IUSE : PseudoInstIA64<(ops variable_ops), "// IUSE">;
42def ADJUSTCALLSTACKUP : PseudoInstIA64<(ops variable_ops),
43 "// ADJUSTCALLSTACKUP">;
44def ADJUSTCALLSTACKDOWN : PseudoInstIA64<(ops variable_ops),
45 "// ADJUSTCALLSTACKDOWN">;
Chris Lattner2e3f5db2005-09-14 21:11:13 +000046def PSEUDO_ALLOC : PseudoInstIA64<(ops GR:$foo), "// PSEUDO_ALLOC">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +000047
48def ALLOC : AForm<0x03, 0x0b,
49 (ops GR:$dst, i8imm:$inputs, i8imm:$locals, i8imm:$outputs, i8imm:$rotating),
50 "alloc $dst = ar.pfs,$inputs,$locals,$outputs,$rotating;;">;
51
52def MOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "mov $dst = $src;;">;
53def PMOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src, PR:$qp),
54 "($qp) mov $dst = $src;;">;
55
56def SPILL_ALL_PREDICATES_TO_GR : AForm<0x03, 0x0b, (ops GR:$dst),
57 "mov $dst = pr;;">;
58def FILL_ALL_PREDICATES_FROM_GR : AForm<0x03, 0x0b, (ops GR:$src),
59 "mov pr = $src;;">;
60
61let isTwoAddress = 1 in {
62 def CMOV : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src2, GR:$src, PR:$qp),
63 "($qp) mov $dst = $src;;">;
64}
65
Duraid Madina291e1262005-03-31 07:32:32 +000066def PFMOV : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src, PR:$qp),
67 "($qp) mov $dst = $src;;">;
68
69let isTwoAddress = 1 in {
70 def CFMOV : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src2, FP:$src, PR:$qp),
71 "($qp) mov $dst = $src;;">;
72}
73
Duraid Madina9b9d45f2005-03-17 18:17:03 +000074let isTwoAddress = 1 in {
75 def TCMPNE : AForm<0x03, 0x0b,
76 (ops PR:$dst, PR:$src2, GR:$src3, GR:$src4),
77 "cmp.ne $dst, p0 = $src3, $src4;;">;
78
79 def TPCMPEQOR : AForm<0x03, 0x0b,
80 (ops PR:$dst, PR:$src2, GR:$src3, GR:$src4, PR:$qp),
81 "($qp) cmp.eq.or $dst, p0 = $src3, $src4;;">;
82
83 def TPCMPNE : AForm<0x03, 0x0b,
84 (ops PR:$dst, PR:$src2, GR:$src3, GR:$src4, PR:$qp),
85 "($qp) cmp.ne $dst, p0 = $src3, $src4;;">;
86
87 def TPCMPEQ : AForm<0x03, 0x0b,
88 (ops PR:$dst, PR:$src2, GR:$src3, GR:$src4, PR:$qp),
89 "($qp) cmp.eq $dst, p0 = $src3, $src4;;">;
90}
91
Duraid Madina5ef2ec92005-04-11 05:55:56 +000092def MOVSIMM14 : AForm<0x03, 0x0b, (ops GR:$dst, s14imm:$imm),
Duraid Madina9b9d45f2005-03-17 18:17:03 +000093 "mov $dst = $imm;;">;
Duraid Madina5ef2ec92005-04-11 05:55:56 +000094def MOVSIMM22 : AForm<0x03, 0x0b, (ops GR:$dst, s22imm:$imm),
95 "mov $dst = $imm;;">;
Duraid Madina1ce0c012005-04-14 10:08:01 +000096def MOVLIMM64 : AForm<0x03, 0x0b, (ops GR:$dst, s64imm:$imm),
Duraid Madina9b9d45f2005-03-17 18:17:03 +000097 "movl $dst = $imm;;">;
98
99def AND : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
100 "and $dst = $src1, $src2;;">;
101def OR : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
102 "or $dst = $src1, $src2;;">;
103def XOR : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
104 "xor $dst = $src1, $src2;;">;
105def SHL : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
106 "shl $dst = $src1, $src2;;">;
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000107def SHLI : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm),
108 "shl $dst = $src1, $imm;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000109def SHRU : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
110 "shr.u $dst = $src1, $src2;;">;
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000111def SHRUI : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm),
Duraid Madina18c0c6b2005-04-07 12:32:24 +0000112 "shr.u $dst = $src1, $imm;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000113def SHRS : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
114 "shr $dst = $src1, $src2;;">;
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000115def SHRSI : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm),
Duraid Madina18c0c6b2005-04-07 12:32:24 +0000116 "shr $dst = $src1, $imm;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000117
Duraid Madinaed095022005-04-13 06:12:04 +0000118def SHLADD : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm, GR:$src2),
119 "shladd $dst = $src1, $imm, $src2;;">;
120
Duraid Madina6dcceb52005-04-08 10:01:48 +0000121def EXTRU : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm1, u6imm:$imm2),
122 "extr.u $dst = $src1, $imm1, $imm2;;">;
123
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000124def DEPZ : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, u6imm:$imm1, u6imm:$imm2), "dep.z $dst = $src1, $imm1, $imm2;;">;
125
126def SXT1 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "sxt1 $dst = $src;;">;
127def ZXT1 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "zxt1 $dst = $src;;">;
128def SXT2 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "sxt2 $dst = $src;;">;
129def ZXT2 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "zxt2 $dst = $src;;">;
130def SXT4 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "sxt4 $dst = $src;;">;
131def ZXT4 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "zxt4 $dst = $src;;">;
132
133// the following are all a bit unfortunate: we throw away the complement
134// of the compare!
135def CMPEQ : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
136 "cmp.eq $dst, p0 = $src1, $src2;;">;
137def CMPGT : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
138 "cmp.gt $dst, p0 = $src1, $src2;;">;
139def CMPGE : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
140 "cmp.ge $dst, p0 = $src1, $src2;;">;
141def CMPLT : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
142 "cmp.lt $dst, p0 = $src1, $src2;;">;
143def CMPLE : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
144 "cmp.le $dst, p0 = $src1, $src2;;">;
145def CMPNE : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
146 "cmp.ne $dst, p0 = $src1, $src2;;">;
147def CMPLTU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
148 "cmp.ltu $dst, p0 = $src1, $src2;;">;
149def CMPGTU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
150 "cmp.gtu $dst, p0 = $src1, $src2;;">;
151def CMPLEU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
152 "cmp.leu $dst, p0 = $src1, $src2;;">;
153def CMPGEU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
154 "cmp.geu $dst, p0 = $src1, $src2;;">;
155
156// and we do the whole thing again for FP compares!
157def FCMPEQ : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
158 "fcmp.eq $dst, p0 = $src1, $src2;;">;
159def FCMPGT : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
160 "fcmp.gt $dst, p0 = $src1, $src2;;">;
161def FCMPGE : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
162 "fcmp.ge $dst, p0 = $src1, $src2;;">;
163def FCMPLT : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
164 "fcmp.lt $dst, p0 = $src1, $src2;;">;
165def FCMPLE : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
166 "fcmp.le $dst, p0 = $src1, $src2;;">;
167def FCMPNE : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
168 "fcmp.neq $dst, p0 = $src1, $src2;;">;
169def FCMPLTU : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
170 "fcmp.ltu $dst, p0 = $src1, $src2;;">;
171def FCMPGTU : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
172 "fcmp.gtu $dst, p0 = $src1, $src2;;">;
173def FCMPLEU : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
174 "fcmp.leu $dst, p0 = $src1, $src2;;">;
175def FCMPGEU : AForm<0x03, 0x0b, (ops PR:$dst, FP:$src1, FP:$src2),
176 "fcmp.geu $dst, p0 = $src1, $src2;;">;
177
178def PCMPEQOR : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2, PR:$qp),
179 "($qp) cmp.eq.or $dst, p0 = $src1, $src2;;">;
180def PCMPEQUNC : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2, PR:$qp),
181 "($qp) cmp.eq.unc $dst, p0 = $src1, $src2;;">;
182def PCMPNE : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2, PR:$qp),
183 "($qp) cmp.ne $dst, p0 = $src1, $src2;;">;
184
185// two destinations!
186def BCMPEQ : AForm<0x03, 0x0b, (ops PR:$dst1, PR:$dst2, GR:$src1, GR:$src2),
187 "cmp.eq $dst1, dst2 = $src1, $src2;;">;
188
189def ADD : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
190 "add $dst = $src1, $src2;;">;
Duraid Madina18c0c6b2005-04-07 12:32:24 +0000191def ADDIMM14 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, s14imm:$imm),
192 "adds $dst = $imm, $src1;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000193
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000194def ADDIMM22 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, s22imm:$imm),
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000195 "add $dst = $imm, $src1;;">;
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000196def CADDIMM22 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, s22imm:$imm, PR:$qp),
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000197 "($qp) add $dst = $imm, $src1;;">;
198
199let isTwoAddress = 1 in {
200def TPCADDIMM22 : AForm<0x03, 0x0b,
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000201 (ops GR:$dst, GR:$src1, s22imm:$imm, PR:$qp),
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000202 "($qp) add $dst = $imm, $dst;;">;
203def TPCMPIMM8NE : AForm<0x03, 0x0b,
Duraid Madina5ef2ec92005-04-11 05:55:56 +0000204 (ops PR:$dst, PR:$src1, s22imm:$imm, GR:$src2, PR:$qp),
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000205 "($qp) cmp.ne $dst , p0 = $imm, $src2;;">;
206}
207
208def SUB : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
209 "sub $dst = $src1, $src2;;">;
Duraid Madina18c0c6b2005-04-07 12:32:24 +0000210def SUBIMM8 : AForm<0x03, 0x0b, (ops GR:$dst, s8imm:$imm, GR:$src2),
211 "sub $dst = $imm, $src2;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000212
213def ST1 : AForm<0x03, 0x0b, (ops GR:$dstPtr, GR:$value),
214 "st1 [$dstPtr] = $value;;">;
215def ST2 : AForm<0x03, 0x0b, (ops GR:$dstPtr, GR:$value),
216 "st2 [$dstPtr] = $value;;">;
217def ST4 : AForm<0x03, 0x0b, (ops GR:$dstPtr, GR:$value),
218 "st4 [$dstPtr] = $value;;">;
219def ST8 : AForm<0x03, 0x0b, (ops GR:$dstPtr, GR:$value),
220 "st8 [$dstPtr] = $value;;">;
221
222def LD1 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$srcPtr),
223 "ld1 $dst = [$srcPtr];;">;
224def LD2 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$srcPtr),
225 "ld2 $dst = [$srcPtr];;">;
226def LD4 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$srcPtr),
227 "ld4 $dst = [$srcPtr];;">;
228def LD8 : AForm<0x03, 0x0b, (ops GR:$dst, GR:$srcPtr),
229 "ld8 $dst = [$srcPtr];;">;
230
Duraid Madina63bbed52005-05-11 05:16:09 +0000231def POPCNT : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src), "popcnt $dst = $src;;">;
232
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000233// some FP stuff:
234def FADD : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2),
235 "fadd $dst = $src1, $src2;;">;
236def FADDS: AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2),
237 "fadd.s $dst = $src1, $src2;;">;
238def FSUB : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2),
239 "fsub $dst = $src1, $src2;;">;
240def FMPY : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2),
241 "fmpy $dst = $src1, $src2;;">;
242def FMOV : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
243 "mov $dst = $src;;">; // XXX: there _is_ no fmov
244def FMA : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3),
245 "fma $dst = $src1, $src2, $src3;;">;
Duraid Madinab366a022005-04-06 09:54:09 +0000246def FMS : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3),
247 "fms $dst = $src1, $src2, $src3;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000248def FNMA : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3),
249 "fnma $dst = $src1, $src2, $src3;;">;
Duraid Madinaa7ee8b82005-04-02 05:18:38 +0000250def FABS : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
251 "fabs $dst = $src;;">;
252def FNEG : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
253 "fneg $dst = $src;;">;
Duraid Madina5c156b72005-04-02 10:06:27 +0000254def FNEGABS : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
255 "fnegabs $dst = $src;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000256
257def CFMAS1 : AForm<0x03, 0x0b,
258 (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3, PR:$qp),
259 "($qp) fma.s1 $dst = $src1, $src2, $src3;;">;
260def CFNMAS1 : AForm<0x03, 0x0b,
261 (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3, PR:$qp),
262 "($qp) fnma.s1 $dst = $src1, $src2, $src3;;">;
263
Duraid Madina6dcceb52005-04-08 10:01:48 +0000264def FRCPAS1 : AForm<0x03, 0x0b, (ops FP:$dstFR, PR:$dstPR, FP:$src1, FP:$src2),
265 "frcpa.s1 $dstFR, $dstPR = $src1, $src2;;">;
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000266
267def XMAL : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src1, FP:$src2, FP:$src3),
268 "xma.l $dst = $src1, $src2, $src3;;">;
269
270def FCVTXF : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
271 "fcvt.xf $dst = $src;;">;
272def FCVTXUF : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
273 "fcvt.xuf $dst = $src;;">;
274def FCVTXUFS1 : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
275 "fcvt.xuf.s1 $dst = $src;;">;
276def FCVTFX : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
277 "fcvt.fx $dst = $src;;">;
278def FCVTFXU : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
279 "fcvt.fxu $dst = $src;;">;
280
281def FCVTFXTRUNC : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
282 "fcvt.fx.trunc $dst = $src;;">;
283def FCVTFXUTRUNC : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
284 "fcvt.fxu.trunc $dst = $src;;">;
285
286def FCVTFXTRUNCS1 : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
287 "fcvt.fx.trunc.s1 $dst = $src;;">;
288def FCVTFXUTRUNCS1 : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
289 "fcvt.fxu.trunc.s1 $dst = $src;;">;
290
291def FNORMD : AForm<0x03, 0x0b, (ops FP:$dst, FP:$src),
292 "fnorm.d $dst = $src;;">;
293
294def GETFD : AForm<0x03, 0x0b, (ops GR:$dst, FP:$src),
295 "getf.d $dst = $src;;">;
296def SETFD : AForm<0x03, 0x0b, (ops FP:$dst, GR:$src),
297 "setf.d $dst = $src;;">;
298
299def GETFSIG : AForm<0x03, 0x0b, (ops GR:$dst, FP:$src),
300 "getf.sig $dst = $src;;">;
301def SETFSIG : AForm<0x03, 0x0b, (ops FP:$dst, GR:$src),
302 "setf.sig $dst = $src;;">;
303
304def LDF4 : AForm<0x03, 0x0b, (ops FP:$dst, GR:$srcPtr),
305 "ldfs $dst = [$srcPtr];;">;
306def LDF8 : AForm<0x03, 0x0b, (ops FP:$dst, GR:$srcPtr),
307 "ldfd $dst = [$srcPtr];;">;
308
309def STF4 : AForm<0x03, 0x0b, (ops GR:$dstPtr, FP:$value),
310 "stfs [$dstPtr] = $value;;">;
311def STF8 : AForm<0x03, 0x0b, (ops GR:$dstPtr, FP:$value),
312 "stfd [$dstPtr] = $value;;">;
313
314let isTerminator = 1, isBranch = 1 in {
315 def BRLCOND_NOTCALL : RawForm<0x03, 0xb0, (ops PR:$qp, i64imm:$dst),
316 "($qp) brl.cond.sptk $dst;;">;
317 def BRCOND_NOTCALL : RawForm<0x03, 0xb0, (ops PR:$qp, GR:$dst),
318 "($qp) br.cond.sptk $dst;;">;
319}
320
321let isCall = 1, isTerminator = 1, isBranch = 1,
Chris Lattnerea6f7702005-04-12 15:12:19 +0000322 Uses = [out0,out1,out2,out3,out4,out5,out6,out7],
Duraid Madina9b9d45f2005-03-17 18:17:03 +0000323// all calls clobber non-callee-saved registers, and for now, they are these:
324 Defs = [r2,r3,r8,r9,r10,r11,r14,r15,r16,r17,r18,r19,r20,r21,r22,r23,r24,
325 r25,r26,r27,r28,r29,r30,r31,
326 p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,
327 F6,F7,F8,F9,F10,F11,F12,F13,F14,F15,
328 F32,F33,F34,F35,F36,F37,F38,F39,F40,F41,F42,F43,F44,F45,F46,F47,F48,F49,
329 F50,F51,F52,F53,F54,F55,F56,
330 F57,F58,F59,F60,F61,F62,F63,F64,F65,F66,F67,F68,F69,F70,F71,F72,F73,F74,
331 F75,F76,F77,F78,F79,F80,F81,
332 F82,F83,F84,F85,F86,F87,F88,F89,F90,F91,F92,F93,F94,F95,F96,F97,F98,F99,
333 F100,F101,F102,F103,F104,F105,
334 F106,F107,F108,F109,F110,F111,F112,F113,F114,F115,F116,F117,F118,F119,
335 F120,F121,F122,F123,F124,F125,F126,F127,
336 out0,out1,out2,out3,out4,out5,out6,out7] in {
337 def BRCALL : RawForm<0x03, 0xb0, (ops calltarget:$dst),
338 "br.call.sptk rp = $dst;;">; // FIXME: teach llvm about branch regs?
339 def BRLCOND_CALL : RawForm<0x03, 0xb0, (ops PR:$qp, i64imm:$dst),
340 "($qp) brl.cond.call.sptk $dst;;">;
341 def BRCOND_CALL : RawForm<0x03, 0xb0, (ops PR:$qp, GR:$dst),
342 "($qp) br.cond.call.sptk $dst;;">;
343}
344
345let isTerminator = 1, isReturn = 1 in
346 def RET : RawForm<0x03, 0xb0, (ops), "br.ret.sptk.many rp;;">; // return
347
348