fixed debug output of unary x87 nodes
[libfirm] / ir / be / scripts / generate_new_opcodes.pl
index 0602ae5..224c592 100755 (executable)
@@ -102,6 +102,8 @@ foreach my $op (keys(%nodes)) {
                push(@obst_cmp_attr, "static int cmp_attr_$op(ir_node *a, ir_node *b) {\n");
                push(@obst_cmp_attr, "  $arch\_attr_t *attr_a = get_$arch\_attr(a);\n");
                push(@obst_cmp_attr, "  $arch\_attr_t *attr_b = get_$arch\_attr(b);\n");
+               push(@obst_cmp_attr, "  (void) attr_a;\n");
+               push(@obst_cmp_attr, "  (void) attr_b;\n");
                push(@obst_cmp_attr, $n{"cmp_attr"});
                push(@obst_cmp_attr, "}\n\n");
 
@@ -222,6 +224,9 @@ foreach my $op (keys(%nodes)) {
                                        elsif ($flag eq "I") {
                                                $temp .= "  flags |= arch_irn_flags_ignore;             /* ignore op for register allocation */\n";
                                        }
+                                       elsif ($flag eq "S") {
+                                               $temp .= "  flags |= arch_irn_flags_modify_sp;          /* op modifies stack pointer */\n";
+                                       }
                                }
                        }
 
@@ -256,6 +261,12 @@ foreach my $op (keys(%nodes)) {
                                $out_param = "NULL, 0";
                        }
                        $temp .= "\n  /* create node */\n";
+
+                       my $latency = 1;
+                       if (exists($n{"latency"})) {
+                               $latency = $n{"latency"};
+                       }
+
                        my $mode = "mode";
                        if ($tuple == 1) {
                                $mode = "mode_T";
@@ -263,7 +274,7 @@ foreach my $op (keys(%nodes)) {
                        $temp .= "  res = new_ir_node(db, irg, block, op_$op, $mode, $arity, ".($arity > 0 ? "in" : "NULL").");\n";
 
                        $temp .= "\n  /* init node attributes */\n";
-                       $temp .= "  init_$arch\_attributes(res, flags, $in_param, $out_param);\n";
+                       $temp .= "  init_$arch\_attributes(res, flags, $in_param, $out_param, $latency);\n";
 
                        if (exists($n{"init_attr"})) {
                                $temp .= "  attr = get_$arch\_attr(res);\n";