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