Made everything really kaputt
[libfirm] / ir / be / ia32 / ia32_spec.pl
1 # Creation: 2005/10/19
2 # $Id$
3 # This is the specification for the ia32 assembler Firm-operations
4
5 # the cpu architecture (ia32, ia64, mips, sparc, ppc, ...)
6
7 $arch = "ia32";
8
9 # The node description is done as a perl hash initializer with the
10 # following structure:
11 #
12 # %nodes = (
13 #
14 # <op-name> => {
15 #   "op_flags" => "N|L|C|X|I|F|Y|H|c",
16 #   "arity"    => "0|1|2|3|variable|dynamic|all",
17 #   "state"    => "floats|pinned",
18 #   "args"     => [
19 #                   { "type" => "type 1", "name" => "name 1" },
20 #                   { "type" => "type 2", "name" => "name 2" },
21 #                   ...
22 #                 ],
23 #   "comment"  => "any comment for constructor",
24 #   "rd_constructor" => "c source code which constructs an ir_node"
25 # },
26 #
27 # ... # (all nodes you need to describe)
28 #
29 # ); # close the %nodes initializer
30
31 # the op_flags correspond to the firm irop_flags:
32 #   N   irop_flag_none
33 #   L   irop_flag_labeled
34 #   C   irop_flag_commutative
35 #   X   irop_flag_cfopcode
36 #   I   irop_flag_ip_cfopcode
37 #   F   irop_flag_fragile
38 #   Y   irop_flag_forking
39 #   H   irop_flag_highlevel
40 #   c   irop_flag_constlike
41 #
42 # op_flags: flags for the operation, OPTIONAL (default is "N")
43 #
44 # state: state of the operation, OPTIONAL (default is "pinned")
45 #
46 # arity: arity of the operation, MUST NOT BE OMITTED
47 #
48 # args:  the OPTIONAL arguments of the node constructor (debug, irg and block
49 #        are always the first 3 arguments and are always autmatically
50 #        created)
51 #        If this key is missing the following arguments will be created:
52 #        for i = 1 .. arity: ir_node *op_i
53 #        ir_mode *mode
54 #
55 # comment: OPTIONAL comment for the node constructor
56 #
57 # rd_constructor: for every operation there will be a
58 #      new_rd_<arch>_<op-name> function with the arguments from above
59 #      which creates the ir_node corresponding to the defined operation
60 #      you can either put the complete source code of this function here
61 #
62 #      This key is OPTIONAL. If omitted, the following constructor will
63 #      be created:
64 #      if (!op_<arch>_<op-name>) assert(0);
65 #      for i = 1 to arity
66 #         set in[i] = op_i
67 #      done
68 #      res = new_ir_node(db, irg, block, op_<arch>_<op-name>, mode, arity, in)
69 #      return res
70 #
71 # NOTE: rd_constructor and args are only optional if and only if arity is 0,1,2 or 3
72
73 %reg_classes = (
74   "general_purpose" => [
75                          { "name" => "eax", "type" => 0 },
76                          { "name" => "ebx", "type" => 0 },
77                          { "name" => "ecx", "type" => 0 },
78                          { "name" => "edx", "type" => 0 },
79                          { "name" => "edi", "type" => 0 },
80                          { "name" => "esi", "type" => 0 },
81                          { "name" => "ebp", "type" => 0 }
82                        ],
83   "floating_point"  => [
84                          { "name" => "xmm0", "type" => 0 },
85                          { "name" => "xmm1", "type" => 0 },
86                          { "name" => "xmm2", "type" => 0 },
87                          { "name" => "xmm3", "type" => 0 },
88                          { "name" => "xmm4", "type" => 0 },
89                          { "name" => "xmm5", "type" => 0 },
90                          { "name" => "xmm6", "type" => 0 },
91                          { "name" => "xmm7", "type" => 0 },
92                        ],
93   "flag_register"   => [
94                          { "name" => "eflags", "type" => 0 }
95                        ]
96 ); # %reg_classes
97
98 #--------------------------------------------------#
99 #                        _                         #
100 #                       (_)                        #
101 #  _ __   _____      __  _ _ __    ___  _ __  ___  #
102 # | '_ \ / _ \ \ /\ / / | | '__|  / _ \| '_ \/ __| #
103 # | | | |  __/\ V  V /  | | |    | (_) | |_) \__ \ #
104 # |_| |_|\___| \_/\_/   |_|_|     \___/| .__/|___/ #
105 #                                      | |         #
106 #                                      |_|         #
107 #--------------------------------------------------#
108
109 %nodes = (
110
111 # arithmetic operations
112
113 # commutative operations
114
115 "Add" => {
116   "op_flags"    => "C",
117   "arity"       => 2,
118   "remat"       => 1,
119   "comment"     => "construct Add: Add(a, b) = Add(b, a) = a + b",
120   "check_inout" => 1,
121   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
122   "emit"        => '. addl %s2, %d1\t\t\t/* Add(%s1, %s2) -> %d1 */'
123 },
124
125 "Add_i" => {
126   "arity"       => 1,
127   "remat"       => 1,
128   "comment"     => "construct Add: Add(a, const) = Add(const, a) = a + const",
129   "check_inout" => 1,
130   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
131   "emit"        => '. addl %c, %d1\t\t\t/* Add(%c, %s1) -> %d1 */'
132 },
133
134 "Mul" => {
135   "op_flags"    => "C",
136   "arity"       => 2,
137   "comment"     => "construct Mul: Mul(a, b) = Mul(b, a) = a * b",
138   "reg_req"     => { "in" => [ "eax", "general_purpose" ], "out" => [ "eax" ] },
139   "emit"        =>
140 '  if (mode_is_signed(get_irn_mode(n))) {
141 4. imull %s2\t\t\t/* signed Mul(%s1, %s2) -> %d1 */
142   }
143   else {
144 4. mull %s2\t\t\t/* unsigned Mul(%s1, %s2) -> %d1 */
145   }
146 '
147 },
148
149 "Mul_i" => {
150   "state"       => "pinned",
151   "arity"       => 1,
152   "comment"     => "construct Mul: Mul(a, const) = Mul(const, a) = a * const",
153 #  "reg_req"     => { "in" => [ "eax" ], "out" => [ "eax" ] },
154   "reg_req"     => { "in" => [ "!eax" ], "out" => [ "eax" ] },
155   "emit"        =>
156 '  if (mode_is_signed(get_irn_mode(n))) {
157 4. imull %c\t\t\t/* signed Mul(%c, %s1) -> %d1 */
158   }
159   else {
160 4. mull %c\t\t\t/* unsigned Mul(%c, %s1) -> %d1 */
161   }
162 '
163 },
164
165 "Mulh" => {
166   "op_flags"    => "C",
167   "arity"       => 2,
168   "comment"     => "construct Mulh: Mulh(a, b) = Mulh(b, a) = get_32_highest_bits(a * b)",
169   "reg_req"     => { "in" => [ "eax", "general_purpose" ], "out" => [ "edx" ] },
170   "emit"        =>
171 '  if (mode_is_signed(get_irn_mode(n))) {
172 4. imull %s2\t\t\t/* signed Mulh(%s1, %s2) -> %d1 */
173   }
174   else {
175 4. mull %s2\t\t\t/* unsigned Mulh(%s1, %s2) -> %d1 */
176   }
177 '
178 },
179
180 "Mulh_i" => {
181   "state"       => "pinned",
182   "arity"       => 1,
183   "comment"     => "construct Mulh: Mulh(a, const) = Mulh(const, a) = get_32_highest_bits(a * const)",
184   "reg_req"     => { "in" => [ "eax" ], "out" => [ "edx" ] },
185   "emit"        =>
186 '  if (mode_is_signed(get_irn_mode(n))) {
187 4. imull %c\t\t\t/* signed Mulh(%c, %s1) -> %d1 */
188   }
189   else {
190 4. mull %c\t\t\t/* unsigned Mulh(%c, %s1) -> %d1 */
191   }
192 '
193 },
194
195 "And" => {
196   "op_flags"    => "C",
197   "arity"       => 2,
198   "remat"       => 1,
199   "comment"     => "construct And: And(a, b) = And(b, a) = a AND b",
200   "check_inout" => 1,
201   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
202   "emit"        => '. andl %s2, %d1\t\t\t/* And(%s1, %s2) -> %d1 */'
203 },
204
205 "And_i" => {
206   "arity"       => 1,
207   "remat"       => 1,
208   "comment"     => "construct And: And(a, const) = And(const, a) = a AND const",
209   "check_inout" => 1,
210   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
211   "emit"        => '. andl %c, %d1\t\t\t/* And(%c, %s1) -> %d1 */'
212 },
213
214 "Or" => {
215   "op_flags"    => "C",
216   "arity"       => 2,
217   "remat"       => 1,
218   "comment"     => "construct Or: Or(a, b) = Or(b, a) = a OR b",
219   "check_inout" => 1,
220   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
221   "emit"        => '. orl %s2, %d1\t\t\t/* Or(%s1, %s2) -> %d1 */'
222 },
223
224 "Or_i" => {
225   "arity"       => 1,
226   "remat"       => 1,
227   "comment"     => "construct Or: Or(a, const) = Or(const, a) = a OR const",
228   "check_inout" => 1,
229   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
230   "emit"        => '. orl %c, %d1\t\t\t/* Or(%c, %s1) -> %d1 */'
231 },
232
233 "Eor" => {
234   "op_flags"    => "C",
235   "arity"       => 2,
236   "remat"       => 1,
237   "comment"     => "construct Eor: Eor(a, b) = Eor(b, a) = a EOR b",
238   "check_inout" => 1,
239   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
240   "emit"        => '. xorl %s2, %d1\t\t\t/* Xor(%s1, %s2) -> %d1 */'
241 },
242
243 "Eor_i" => {
244   "arity"       => 1,
245   "remat"       => 1,
246   "comment"     => "construct Eor: Eor(a, const) = Eor(const, a) = a EOR const",
247   "check_inout" => 1,
248   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
249   "emit"        => '. xorl %c, %d1\t\t\t/* Xor(%c, %s1) -> %d1 */'
250 },
251
252 "Max" => {
253   "op_flags"    => "C",
254   "arity"       => 2,
255   "remat"       => 1,
256   "comment"     => "construct Max: Max(a, b) = Max(b, a) = a > b ? a : b",
257   "check_inout" => 1,
258   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
259   "emit"        =>
260 '2. cmpl %s2, %s1\t\t\t/* prepare Max (%s1 should be %d1) */
261   if (mode_is_signed(get_irn_mode(n))) {
262 4.  cmovl %s2, %d1\t\t\t/* %s1 is less %s2 */
263   }
264   else {
265 4.  cmovb %s2, %d1\t\t\t/* %s1 is below %s2 */
266   }
267 '
268 },
269
270 "Min" => {
271   "op_flags"    => "C",
272   "arity"       => 2,
273   "remat"       => 1,
274   "comment"     => "construct Min: Min(a, b) = Min(b, a) = a < b ? a : b",
275   "check_inout" => 1,
276   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
277   "emit"        =>
278 '2. cmpl %s2, %s1\t\t\t/* prepare Min (%s1 should be %d1) */
279   if (mode_is_signed(get_irn_mode(n))) {
280 2.  cmovg %s2, %d1\t\t\t/* %s1 is greater %s2 */
281   }
282   else {
283 2.  cmova %s2, %d1\t\t\t/* %s1 is above %s2 */
284   }
285 '
286 },
287
288 # not commutative operations
289
290 "Sub" => {
291   "arity"       => 2,
292   "remat"       => 1,
293   "comment"     => "construct Sub: Sub(a, b) = a - b",
294   "check_inout" => 1,
295   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
296   "emit"        => '. subl %s2, %d1\t\t\t/* Sub(%s1, %s2) -> %d1 */'
297 },
298
299 "Sub_i" => {
300   "arity"       => 1,
301   "remat"       => 1,
302   "comment"     => "construct Sub: Sub(a, const) = a - const",
303   "check_inout" => 1,
304   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
305   "emit"        => '. subl %c, %d1\t\t\t/* Sub(%s1, %c) -> %d1 */'
306 },
307
308 "DivMod" => {
309   "arity"       => 4,
310   "comment"     => "construct DivMod: DivMod(a,b) = (a / b, a % b)",
311   "reg_req"     => { "in" => [ "eax", "general_purpose", "edx" ], "out" => [ "eax", "edx" ] },
312   "emit"        =>
313 '  if (mode_is_signed(get_irn_mode(n))) {
314 4.  idivl %s2\t\t\t/* signed Mod(%s1, %s2) -> %d1 */
315   }
316   else {
317 4.  divl %s2\t\t\t/* unsigned Mod(%s1, %s2) -> %d1 */
318   }
319 ',
320   "args"     => [
321                   { "type" => "ir_node *",        "name" => "mem" },
322                   { "type" => "ir_node *",        "name" => "divisor" },
323                   { "type" => "ir_node *",        "name" => "dividend" },
324                   { "type" => "divmod_flavour_t", "name" => "dm_flav" },   # flavours (flavour_Div, flavour_Mod, flavour_DivMod)
325                   { "type" => "ir_mode *",        "name" => "mode" },
326                 ],
327   "rd_constructor" =>
328 "  ir_node *res;
329   ir_node *in[4];
330
331   if (!op_ia32_DivMod) assert(0);
332
333   in[0] = mem;
334   in[2] = dividend;
335
336   if (mode_is_signed(mode)) {
337     ir_node *cltd;
338     /* in signed mode , we need to sign extend the divisor */
339     cltd  = new_rd_ia32_Cltd(db, current_ir_graph, block, divisor, mode_T);
340     in[1] = new_rd_Proj(db, current_ir_graph, block, cltd, mode, pn_EAX);
341     in[3] = new_rd_Proj(db, current_ir_graph, block, cltd, mode, pn_EDX);
342   }
343   else {
344     in[1] = divisor;
345     in[3] = new_rd_ia32_Const(db, current_ir_graph, block, mode);
346     set_ia32_Const_type(in[2], asmop_Const);
347     set_ia32_Immop_tarval(in[2], get_tarval_null(mode_Iu));
348   }
349
350   res = new_ir_node(db, irg, block, op_ia32_DivMod, mode, 4, in);
351
352   set_ia32_DivMod_flavour(res, dm_flav);
353   set_ia32_n_res(res, 2);
354
355   return res;
356 "
357 },
358
359 "Shl" => {
360   "arity"       => 2,
361   "remat"       => 1,
362   "comment"     => "construct Shl: Shl(a, b) = a << b",
363   "check_inout" => 1,
364   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
365   "emit"        => '. shll %s2, %d1\t\t\t/* Shl(%s1, %s2) -> %d1 */'
366 },
367
368 "Shl_i" => {
369   "arity"       => 1,
370   "remat"       => 1,
371   "comment"     => "construct Shl: Shl(a, const) = a << const",
372   "check_inout" => 1,
373   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
374   "emit"        => '. shll %c, %d1\t\t\t/* Shl(%s1, %c) -> %d1 */'
375 },
376
377 "Shr" => {
378   "arity"       => 2,
379   "remat"       => 1,
380   "comment"     => "construct Shr: Shr(a, b) = a >> b",
381   "check_inout" => 1,
382   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
383   "emit"        => '. shrl %s2, %d1\t\t\t/* Shr(%s1, %s2) -> %d1 */'
384 },
385
386 "Shr_i" => {
387   "arity"       => 1,
388   "remat"       => 1,
389   "comment"     => "construct Shr: Shr(a, const) = a >> const",
390   "check_inout" => 1,
391   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
392   "emit"        => '. shrl %c, %d1\t\t\t/* Shr(%s1, %c) -> %d1 */'
393 },
394
395 "Shrs" => {
396   "arity"       => 2,
397   "remat"       => 1,
398   "comment"     => "construct Shrs: Shrs(a, b) = a >> b",
399   "check_inout" => 1,
400   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
401   "emit"        => '. sarl %s2, %d1\t\t\t/* Shrs(%s1, %s2) -> %d1 */'
402 },
403
404 "Shrs_i" => {
405   "arity"       => 1,
406   "remat"       => 1,
407   "comment"     => "construct Shrs: Shrs(a, const) = a >> const",
408   "check_inout" => 1,
409   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
410   "emit"        => '. sarl %c, %d1\t\t\t/* Shrs(%s1, %c) -> %d1 */'
411 },
412
413 "RotR" => {
414   "arity"       => 2,
415   "remat"       => 1,
416   "comment"     => "construct RotR: RotR(a, b) = a ROTR b",
417   "check_inout" => 1,
418   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
419   "emit"        => '. rorl %s2, %d1\t\t\t/* RotR(%s1, %s2) -> %d1 */'
420 },
421
422 "RotL" => {
423   "arity"       => 2,
424   "remat"       => 1,
425   "comment"     => "construct RotL: RotL(a, b) = a ROTL b",
426   "check_inout" => 1,
427   "reg_req"     => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "in_s1" ] },
428   "emit"        => '. roll %s2, %d1\t\t\t/* RotL(%s1, %s2) -> %d1 */'
429 },
430
431 "RotL_i" => {
432   "arity"       => 1,
433   "remat"       => 1,
434   "comment"     => "construct RotL: RotL(a, const) = a ROTL const",
435   "check_inout" => 1,
436   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
437   "emit"        => '. roll %c, %d1\t\t\t/* RotL(%s1, %c) -> %d1 */'
438 },
439
440 "Minus" => {
441   "arity"       => 1,
442   "remat"       => 1,
443   "comment"     => "construct Minus: Minus(a) = -a",
444   "check_inout" => 1,
445   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
446   "emit"        => '. negl %d1\t\t\t/* Neg(%s1) -> %d1 */'
447 },
448
449 "Inc" => {
450   "arity"       => 1,
451   "remat"       => 1,
452   "comment"     => "construct Increment: Inc(a) = a++",
453   "check_inout" => 1,
454   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
455   "emit"        => '. incl %d1\t\t\t/* Inc(%s1) -> %d1 */'
456 },
457
458 "Dec" => {
459   "arity"       => 1,
460   "remat"       => 1,
461   "comment"     => "construct Decrement: Dec(a) = a--",
462   "check_inout" => 1,
463   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
464   "emit"        => '. decl %d1\t\t\t/* Dec(%s1) -> %d1 */'
465 },
466
467 "Not" => {
468   "arity"       => 1,
469   "remat"       => 1,
470   "comment"     => "construct Not: Not(a) = !a",
471   "check_inout" => 1,
472   "reg_req"     => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
473   "emit"        => '. notl %d1\t\t\t/* Not(%s1) -> %d1 */'
474 },
475
476 # other operations
477
478 "Conv" => {
479   "arity"    => 1,
480   "reg_req"  => { "in" => [ "general_purpose" ], "out" => [ "in_s1" ] },
481   "comment"  => "construct Conv: Conv(a) = (conv)a"
482 },
483
484 "Cmp" => {
485   "op_flags" => "C",
486   "arity"    => 2,
487   "comment"  => "construct Cmp: Cmp(a, b) = a CMP b",
488   "reg_req"  => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "flag_register" ] },
489   "emit"     => '. cmpl %s2, %s1\t\t\t/* Cmp(%s1, %s2) -> flags */'
490 },
491
492 "Cmp_i" => {
493   "arity"    => 1,
494   "comment"  => "construct Cmp: Cmp(a, const) = Cmp(const, a) = a CMP const",
495   "reg_req"  => { "in" => [ "general_purpose" ], "out" => [ "flag_register" ] },
496   "emit"     => '. cmpl %c, %s1\t\t\t/* Cmp(%s1, %c) -> flags */'
497 },
498
499 "Cond" => {
500   "arity"    => 1,
501   "comment"  => "construct Cond: evaluate Cmp node",
502   "reg_req"  => { "in" => [ "flag_register" ] }
503 },
504
505 "Const" => {
506   "arity"    => "0",
507   "remat"    => 1,
508   "comment"  => "represents an integer constant",
509   "reg_req"  => { "out" => [ "general_purpose" ] },
510 },
511
512 "Cltd" => {
513   "arity"       => 1,
514   "remat"       => 1,
515   "comment"     => "construct Cltd: sign extend EAX -> EDX:EAX",
516   "reg_req"     => { "in" => [ "eax" ], "out" => [ "eax", "edx" ] },
517   "emit"        => '. cltd\t\t\t/* sign extend EAX -> EDX:EAX */'
518 },
519
520 # Load / Store
521
522 "Load" => {
523   "arity"    => 2,
524   "remat"    => 1,
525   "comment"  => "construct Load: Load(mem-edge, ptr) = LD ptr",
526   "reg_req"  => { "in" => [ "none", "general_purpose" ], "out" => [ "general_purpose" ] },
527   "emit"     => '. movl (%s1), %d1\t\t\t/* Load((%s1)) -> %d1 */'
528 },
529
530 "Store" => {
531   "arity"    => 3,
532   "remat"    => 1,
533   "comment"  => "construct Store: Store(mem-edge, ptr, val) = ST ptr,val",
534   "reg_req"  => { "in" => [ "none", "general_purpose", "general_purpose" ], "out" => [ "general_purpose" ] },
535   "emit"     => '. movl %s1, (%d1)\t\t\t/* Store(%s1) -> (%d1) */'
536 },
537
538 "Lea" => {
539   "arity"    => 2,
540   "comment"  => "construct Lea: Lea(a,b) = lea offs(a,b,const) | res = a + b * const + offs with const = 0,1,2,4,8",
541   "reg_req"  => { "in" => [ "general_purpose", "general_purpose" ], "out" => [ "general_purpose" ] },
542   "emit"     => '. leal %o(%s1, %s2, %c), %d1\t\t\t/* %d1 = %s1 + %s2 << %c + %o */'
543 },
544
545 "Lea_i" => {
546   "arity"    => 1,
547   "comment"  => "construct Lea: Lea(a) = lea offs(a) | res = a + offs",
548   "reg_req"  => { "in" => [ "general_purpose" ], "out" => [ "general_purpose" ] },
549   "emit"     => '. leal %c(%s1), %d1\t\t\t/* %d1 = %s1 + %c */'
550 },
551
552 "Jmp" => {
553   "arity"    => 0,
554   "comment"  => "construct Jump: Jmp(Label)",
555   "emit"     => '. jmp %l /* jump to label %l */'
556 },
557
558 # Call
559
560 "Call" => {
561   "arity"    => 1,
562   "spill"    => 0,
563   "comment"  => "construct Call: Call(...)",
564   "args"     => [ { "type" => "ir_node *", "name" => "old_call" } ],
565   "rd_constructor" =>
566 "  ir_node *res;
567   ir_node *in[1];
568   asmop_attr *attr;
569
570   if (!op_ia32_Call) assert(0);
571
572   in[0] = get_Call_mem(old_call);
573
574   res = new_ir_node(db, irg, block, op_ia32_Call, mode_T, 1, in);
575
576   attr         = get_ia32_attr(res);
577   attr->old_ir = get_Call_ptr(old_call);
578   attr->n_res  = 1;
579
580   return res;
581 "
582 }
583
584 ); # end of %nodes