- removed C99 features
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Fri, 23 May 2008 21:08:55 +0000 (21:08 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Fri, 23 May 2008 21:08:55 +0000 (21:08 +0000)
- set be_ops only once
- do not overwrite already set be_ops

[r19742]

ir/be/scripts/generate_new_opcodes.pl

index a97cacd..2246f06 100755 (executable)
@@ -715,12 +715,6 @@ void $arch\_create_opcodes(const arch_irn_ops_t *be_ops) {
        int        cur_opcode;
        static int run_once = 0;
        int        i;
-
-       /* we handle all middleend nodes as well */
-       for (i = 0; i <= iro_Last; ++i) {
-               ir_op *op      = get_irp_opcode(i);
-               op->ops.be_ops = be_ops;
-       }
 ENDOFMAIN
 
        if(defined($default_op_attr_type)) {
@@ -733,6 +727,13 @@ print OUT<<ENDOFMAIN;
                return;
        run_once = 1;
 
+       /* we handle all middleend nodes as well that have no other handler */
+       for (i = 0; i <= iro_Last; ++i) {
+               ir_op *op      = get_irp_opcode(i);
+               if (op->ops.be_ops == NULL)
+                       op->ops.be_ops = be_ops;
+       }
+
        cur_opcode = get_next_ir_opcodes(iro_$arch\_last);
 
        $arch\_opcode_start = cur_opcode;