activated assure constraints
[libfirm] / ir / be / scripts / generate_new_opcodes.pl
index 23ef60c..36e07c6 100755 (executable)
@@ -271,7 +271,7 @@ foreach my $op (keys(%nodes)) {
 
        $n_opcodes++;
        $temp  = "  op_$op = new_ir_op(cur_opcode++, \"$op\", op_pin_state_".$n{"state"}.", ".$n{"op_flags"};
-       $temp .= ", ".translate_arity($arity).", 0, sizeof($arch\_attr_t), &ops);\n";
+       $temp .= "|M, ".translate_arity($arity).", 0, sizeof($arch\_attr_t), &ops);\n";
        push(@obst_new_irop, $temp);
 }
 
@@ -292,6 +292,14 @@ print OUT<<ENDOFISIRN;
 static opcode $arch\_opcode_start = -1;
 static opcode $arch\_opcode_end   = -1;
 
+opcode get_$arch\_opcode_first(void) {
+  return $arch\_opcode_start + 1;
+}
+
+opcode get_$arch\_opcode_last(void) {
+  return $arch\_opcode_end - 1;
+}
+
 int is_$arch\_irn(const ir_node *node) {
   opcode opc = get_irn_opcode(node);
 
@@ -324,6 +332,8 @@ void $arch\_create_opcodes(void) {
 #define H   irop_flag_highlevel
 #define c   irop_flag_constlike
 #define K   irop_flag_keep
+#define M   irop_flag_machine
+#define R   (irop_flag_machine<<1)
 
   ir_op_ops ops;
   int cur_opcode = get_next_ir_opcodes($n_opcodes);
@@ -343,7 +353,9 @@ close(OUT);
 
 open(OUT, ">$target_h") || die("Could not open $target_h, reason: $!\n");
 
-print OUT "int is_$arch\_irn(const ir_node *node);\n";
+print OUT "int is_$arch\_irn(const ir_node *node);\n\n";
+print OUT "opcode get_$arch\_opcode_first(void);\n";
+print OUT "opcode get_$arch\_opcode_last(void);\n\n";
 print OUT @obst_header;
 
 close(OUT);