Fix fehler171
[libfirm] / scripts / ir_spec.py
index f451ae6..38db834 100755 (executable)
@@ -43,9 +43,7 @@ class Alloc(Op):
        pinned      = "yes"
        attr_struct = "alloc_attr"
        d_post = '''
-       #if PRECISE_EXC_CONTEXT
        firm_alloc_frag_arr(res, op_Alloc, &res->attr.alloc.exc.frag_arr);
-       #endif
        '''
 
 class Anchor(Op):
@@ -198,9 +196,7 @@ class Bound(Op):
        pinned_init = "op_pin_state_pinned"
        attr_struct = "bound_attr"
        d_post = '''
-       #if PRECISE_EXC_CONTEXT
        firm_alloc_frag_arr(res, op_Bound, &res->attr.bound.exc.frag_arr);
-       #endif
        '''
 
 class Break(Op):
@@ -211,7 +207,7 @@ class Break(Op):
 class Builtin(Op):
        ins      = [ "mem" ]
        arity    = "variable"
-       outs     = [ "M_regular", "X_regular", "X_except", "T_result", "M_except", "P_value_res_base" ]
+       outs     = [ "M", "X_regular", "X_except", "T_result", "P_value_res_base" ]
        flags    = [ "uses_memory" ]
        attrs    = [
                dict(
@@ -233,12 +229,18 @@ class Builtin(Op):
 class Call(Op):
        ins      = [ "mem", "ptr" ]
        arity    = "variable"
-       outs     = [ "M_regular", "X_regular", "X_except", "T_result", "M_except", "P_value_res_base" ]
+       outs     = [ "M", "X_regular", "X_except", "T_result", "P_value_res_base" ]
        flags    = [ "fragile", "uses_memory" ]
        attrs    = [
                dict(
                        type = "ir_type*",
                        name = "type"
+               ),
+               dict(
+                       type = "unsigned",
+                       name = "tail_call",
+                       # the tail call attribute can only be set by analysis
+                       init = "0"
                )
        ]
        attr_struct = "call_attr"
@@ -248,9 +250,7 @@ class Call(Op):
        assert((get_unknown_type() == type) || is_Method_type(type));
        '''
        d_post = '''
-       #if PRECISE_EXC_CONTEXT
        firm_alloc_frag_arr(res, op_Call, &res->attr.call.exc.frag_arr);
-       #endif
        '''
 
 class CallBegin(Op):
@@ -271,11 +271,9 @@ class CallBegin(Op):
 class Carry(Binop):
        flags = [ "commutative" ]
 
-class Cast(Op):
-       ins      = [ "op" ]
+class Cast(Unop):
        mode     = "get_irn_mode(irn_op)"
        flags    = [ "highlevel" ]
-       pinned   = "no"
        attrs    = [
                dict(
                        type = "ir_type*",
@@ -369,9 +367,7 @@ class CopyB(Op):
        pinned      = "memory"
        pinned_init = "op_pin_state_pinned"
        d_post = '''
-       #if PRECISE_EXC_CONTEXT
        firm_alloc_frag_arr(res, op_CopyB, &res->attr.copyb.exc.frag_arr);
-       #endif
        '''
 
 class Div(Op):
@@ -399,9 +395,7 @@ class Div(Op):
        op_index    = 1
        arity_override = "oparity_binary"
        d_post = '''
-       #if PRECISE_EXC_CONTEXT
        firm_alloc_frag_arr(res, op_Div, &res->attr.except.frag_arr);
-       #endif
        '''
 
 class DivMod(Op):
@@ -420,9 +414,7 @@ class DivMod(Op):
        op_index    = 1
        arity_override = "oparity_binary"
        d_post = '''
-       #if PRECISE_EXC_CONTEXT
        firm_alloc_frag_arr(res, op_DivMod, &res->attr.except.frag_arr);
-       #endif
        '''
 
 class Dummy(Op):
@@ -500,7 +492,7 @@ class IJmp(Op):
 
 class InstOf(Op):
        ins   = [ "store", "obj" ]
-       outs  = [ "M", "X_regular", "X_except", "res", "M_except" ]
+       outs  = [ "M", "X_regular", "X_except", "res" ]
        flags = [ "highlevel" ]
        attrs = [
                dict(
@@ -539,9 +531,7 @@ class Load(Op):
                ),
        ]
        d_post = '''
-#if PRECISE_EXC_CONTEXT
        firm_alloc_frag_arr(res, op_Load, &res->attr.load.exc.frag_arr);
-#endif
        '''
 
 class Minus(Unop):
@@ -563,9 +553,7 @@ class Mod(Op):
        op_index    = 1
        arity_override = "oparity_binary"
        d_post = '''
-       #if PRECISE_EXC_CONTEXT
        firm_alloc_frag_arr(res, op_Mod, &res->attr.except.frag_arr);
-       #endif
        '''
 
 class Mul(Binop):
@@ -642,9 +630,7 @@ class Quot(Op):
        op_index    = 1
        arity_override = "oparity_binary"
        d_post = '''
-       #if PRECISE_EXC_CONTEXT
        firm_alloc_frag_arr(res, op_Quot, &res->attr.except.frag_arr);
-       #endif
        '''
 
 class Raise(Op):
@@ -706,9 +692,7 @@ class Store(Op):
                ),
        ]
        d_post = '''
-#if PRECISE_EXC_CONTEXT
        firm_alloc_frag_arr(res, op_Store, &res->attr.store.exc.frag_arr);
-#endif
        '''
 
 class Sub(Binop):