Do not mark the transformed as visited. It makes no sense at all.
[libfirm] / ir / be / ppc32 / ppc32_spec.pl
index a60463c..a492fc0 100644 (file)
@@ -7,10 +7,6 @@
 $arch = "ppc32";
 $new_emit_syntax = 1;
 
-# this strings mark the beginning and the end of a comment in emit
-$comment_string     = "/*";
-$comment_string_end = "*/";
-
 # The node description is done as a perl hash initializer with the
 # following structure:
 #
@@ -26,11 +22,19 @@ $comment_string_end = "*/";
 #                    { "type" => "type 2", "name" => "name 2" },
 #                    ...
 #                  ],
-#   "comment"   => "any comment for constructor",
-#   "reg_req"   => { "in" => [ "reg_class|register" ], "out" => [ "reg_class|register|in_rX" ] },
-#   "cmp_attr"  => "c source code for comparing node attributes",
-#   "emit"      => "emit code with templates",
-#   "rd_constructor" => "c source code which constructs an ir_node"
+#   comment   => "any comment for constructor",
+#   reg_req   => { "in" => [ "reg_class|register" ], "out" => [ "reg_class|register|in_rX" ] },
+#   cmp_attr  => "c source code for comparing node attributes",
+#   outs      => { "out1", "out2" } # optional, creates pn_op_out1, ... consts
+#   ins       => { "in1", "in2" }   # optional, creates n_op_in1, ... consts
+#   mode      => "mode_Iu"          # optional, predefines the mode
+#   emit      => "emit code with templates",
+#   attr      => "attitional attribute arguments for constructor",
+#   init_attr => "emit attribute initialization template",
+#   rd_constructor => "c source code which constructs an ir_node",
+#   hash_func => "name of the hash function for this operation",
+#   latency   => "latency of this operation (can be float)"
+#   attr_type => "name of the attribute struct",
 # },
 #
 # ... # (all nodes you need to describe)
@@ -187,17 +191,19 @@ $comment_string_end = "*/";
 ); # %reg_classes
 
 %emit_templates = (
-    S0 => "${arch}_emit_source_register(env, node, 0);",
-    S1 => "${arch}_emit_source_register(env, node, 1);",
-    S2 => "${arch}_emit_source_register(env, node, 2);",
-    D0 => "${arch}_emit_dest_register(env, node, 0);",
-    D1 => "${arch}_emit_dest_register(env, node, 1);",
-    D2 => "${arch}_emit_dest_register(env, node, 2);",
-       O  => "${arch}_emit_offset(env, node);",
-       C  => "${arch}_emit_immediate(env, node);",
-       RLWIMI => "${arch}_emit_rlwimi_helper(env, node);",
+    S0 => "${arch}_emit_source_register(node, 0);",
+    S1 => "${arch}_emit_source_register(node, 1);",
+    S2 => "${arch}_emit_source_register(node, 2);",
+    D0 => "${arch}_emit_dest_register(node, 0);",
+    D1 => "${arch}_emit_dest_register(node, 1);",
+    D2 => "${arch}_emit_dest_register(node, 2);",
+       O  => "${arch}_emit_offset(node);",
+       C  => "${arch}_emit_immediate(node);",
+       RLWIMI => "${arch}_emit_rlwimi_helper(node);",
 );
 
+$default_cmp_attr = "NULL";
+
 #--------------------------------------------------#
 #                        _                         #
 #                       (_)                        #
@@ -233,7 +239,6 @@ $comment_string_end = "*/";
 },
 
 "Addi" => {
-  "op_flags"  => "c",
   "irn_flags" => "R",
   "comment"   => "construct Add: Addi(a, const) = Addi(const, a) = a + const",
   "reg_req"   => { "in" => [ "!r0" ], "out" => [ "gp" ] },
@@ -590,7 +595,6 @@ $comment_string_end = "*/";
 },
 
 "Ori" => {
-  "op_flags"  => "c",
   "irn_flags" => "R",
   "comment"   => "ors constant with register",
   "reg_req"   => { "in" => [ "gp"], "out" => [ "gp" ] },
@@ -602,7 +606,6 @@ $comment_string_end = "*/";
 },
 
 "Andi_dot" => {
-  "op_flags"  => "c",
   "irn_flags" => "R",
   "comment"   => "ands constant with register with cr0 update",
   "reg_req"   => { "in" => [ "gp"], "out" => [ "gp", "cr0" ] },
@@ -727,7 +730,7 @@ $comment_string_end = "*/";
   "op_flags"  => "L|F",
   "state"     => "exc_pinned",
   "comment"   => "construct Store: Store (byte) (ptr, val, mem) = ST ptr,val",
-  "reg_req"   => { "in" => [ "!r0", "gp", "none" ] },
+  "reg_req"   => { "in" => [ "!r0", "gp", "none" ], "out" => [ "none" ] },
   "emit"      => '. stb %S1, %O(%S0)',
   "cmp_attr"  =>
 '
@@ -740,7 +743,7 @@ $comment_string_end = "*/";
   "op_flags"  => "L|F",
   "state"     => "exc_pinned",
   "comment"   => "construct Store: Store (halfword) (ptr, val, mem) = ST ptr,val",
-  "reg_req"   => { "in" => [ "!r0", "gp", "none" ] },
+  "reg_req"   => { "in" => [ "!r0", "gp", "none" ], "out" => [ "none" ] },
   "emit"      => '. sth %S1, %O(%S0)',
   "cmp_attr"  =>
 '
@@ -753,7 +756,7 @@ $comment_string_end = "*/";
   "op_flags"  => "L|F",
   "state"     => "exc_pinned",
   "comment"   => "construct Store: Store (word) (ptr, val, mem) = ST ptr,val",
-  "reg_req"   => { "in" => [ "!r0", "gp", "none" ] },
+  "reg_req"   => { "in" => [ "!r0", "gp", "none" ], "out" => [ "none" ] },
   "emit"      => '. stw %S1, %O(%S0)',
   "cmp_attr"  =>
 '
@@ -950,7 +953,7 @@ $comment_string_end = "*/";
   "op_flags"  => "L|F",
   "state"     => "exc_pinned",
   "comment"   => "construct Store (double): Store(ptr, val, mem)  = ST ptr,val",
-  "reg_req"   => { "in" => [ "!r0", "fp", "none" ] },
+  "reg_req"   => { "in" => [ "!r0", "fp", "none" ], "out" => [ "none" ] },
   "emit"      => '. stfd %S1, %O(%S0)',
   "cmp_attr"  =>
 '
@@ -963,7 +966,7 @@ $comment_string_end = "*/";
   "op_flags"  => "L|F",
   "state"     => "exc_pinned",
   "comment"   => "construct Store (single): Store(ptr, val, mem)  = ST ptr,val",
-  "reg_req"   => { "in" => [ "!r0", "fp", "none" ] },
+  "reg_req"   => { "in" => [ "!r0", "fp", "none" ], "out" => [ "none" ] },
   "emit"      => '. stfs %S1, %O(%S0)',
   "cmp_attr"  =>
 '