amd64: Added Mul.
[libfirm] / scripts / ir_spec.py
index e51d36d..158de80 100755 (executable)
@@ -27,7 +27,7 @@ class Add(Binop):
        flags = ["commutative"]
 
 class Alloc(Op):
-       ins   = [ "mem", "size" ]
+       ins   = [ "mem", "count" ]
        outs  = [ "M", "X_regular", "X_except", "res" ]
        flags = [ "fragile", "uses_memory" ]
        attrs = [
@@ -61,9 +61,10 @@ class ASM(Op):
        mode          = "mode_T"
        arity         = "variable"
        flags         = [ "keep", "uses_memory" ]
-       attr_struct   = "asm_attr"
        pinned        = "memory"
        pinned_init   = "op_pin_state_pinned"
+       attr_struct   = "asm_attr"
+       attrs_name    = "assem"
        attrs = [
                dict(
                        name = "input_constraints",
@@ -72,6 +73,7 @@ class ASM(Op):
                dict(
                        name = "n_output_constraints",
                        type = "int",
+                       noprop = True,
                ),
                dict(
                        name = "output_constraints",
@@ -80,6 +82,7 @@ class ASM(Op):
                dict(
                        name = "n_clobbers",
                        type = "int",
+                       noprop = True,
                ),
                dict(
                        name = "clobbers",
@@ -175,6 +178,7 @@ class Bound(Op):
        pinned = "exception"
        pinned_init = "op_pin_state_pinned"
        attr_struct = "bound_attr"
+       attrs_name  = "bound"
        d_post = '''
        firm_alloc_frag_arr(res, op_Bound, &res->attr.bound.exc.frag_arr);
        '''
@@ -264,7 +268,24 @@ class Cast(Unop):
        init     = "assert(is_atomic_type(type));"
 
 class Cmp(Binop):
-       outs  = [ "False", "Eq", "Lt", "Le", "Gt", "Ge", "Lg", "Leg", "Uo", "Ue", "Ul", "Ule", "Ug", "Uge", "Ne", "True" ]
+       outs  = [
+               ("False", "always false"),
+               ("Eq",    "equal"),
+               ("Lt",    "less"),
+               ("Le",    "less or equal"),
+               ("Gt",    "greater"),
+               ("Ge",    "greater or equal"),
+               ("Lg",    "less or greater"),
+               ("Leg",   "less, equal or greater ('not equal' for integer numbers)"),
+               ("Uo",    "unordered"),
+               ("Ue",    "unordered or equal"),
+               ("Ul",    "unordered or less"),
+               ("Ule",   "unordered, less or equal"),
+               ("Ug",    "unordered or greater"),
+               ("Uge",   "onordered, greater or equal"),
+               ("Ne",    "unordered, less, greater or equal ('not equal' for floatingpoint numbers)"),
+               ("True",  "always true"),
+       ]
        flags = []
 
 class Cond(Op):
@@ -298,6 +319,7 @@ class Confirm(Op):
                ),
        ]
        attr_struct = "confirm_attr"
+       attrs_name  = "confirm"
 
 class Const(Op):
        mode       = ""
@@ -327,6 +349,7 @@ class Conv(Unop):
                )
        ]
        attr_struct = "conv_attr"
+       attrs_name  = "conv"
 
 class CopyB(Op):
        ins   = [ "mem", "dst", "src" ]
@@ -339,6 +362,7 @@ class CopyB(Op):
                )
        ]
        attr_struct = "copyb_attr"
+       attrs_name  = "copyb"
        pinned      = "memory"
        pinned_init = "op_pin_state_pinned"
        d_post = '''
@@ -435,6 +459,7 @@ class Filter(Op):
        ]
        pinned      = "yes"
        attr_struct = "filter_attr"
+       attrs_name  = "filter"
        java_noconstr = True
 
 class Free(Op):
@@ -556,11 +581,11 @@ class Or(Binop):
        flags = [ "commutative" ]
 
 class Phi(Op):
-       pinned      = "yes"
-       arity       = "variable"
-       flags       = []
-       attr_struct = "phi_attr"
-       custom_is   = True
+       pinned        = "yes"
+       arity         = "variable"
+       flags         = []
+       attr_struct   = "phi_attr"
+       custom_is     = True
        java_noconstr = True
        init = '''
        /* Memory Phis in endless loops must be kept alive.
@@ -576,14 +601,19 @@ class Pin(Op):
        pinned   = "yes"
 
 class Proj(Op):
-       ins      = [ "pred" ]
-       flags    = []
-       pinned   = "no"
-       attrs    = [
+       ins        = [ "pred" ]
+       flags      = []
+       pinned     = "no"
+       knownBlock = True
+       knownGraph = True
+       block      = "get_nodes_block(irn_pred)"
+       graph      = "get_irn_irg(irn_pred)"
+       attrs      = [
                dict(
                        type = "long",
                        name = "proj",
-                       initname = ""
+                       initname = "",
+                       noprop = False,
                )
        ]
        attr_struct = "long"
@@ -681,7 +711,8 @@ class SymConst(Op):
        attrs      = [
                dict(
                        type = "ir_entity*",
-                       name = "entity"
+                       name = "entity",
+                       noprop = True
                )
        ]
        attr_struct = "symconst_attr"