Commit bf8e5e5d authored by Matthias Braun's avatar Matthias Braun
Browse files

remove special case with ir_cons_flags argument

[r28235]
parent 066e8d77
......@@ -233,14 +233,6 @@ def preprocess_node(node):
for arg in node.constructor_args:
arguments.append(prepare_attr(arg))
if arg["type"] == "ir_cons_flags":
name = arg["name"]
initattrs.append(dict(fqname = ".exc.pin_state",
init = name + " & cons_floats ? op_pin_state_floats : op_pin_state_pinned"))
initattrs.append(dict(fqname = ".volatility",
init = name + " & cons_volatile ? volatility_is_volatile : volatility_non_volatile"))
initattrs.append(dict(fqname = ".aligned",
init = name + " & cons_unaligned ? align_non_aligned : align_is_aligned"))
node.arguments = arguments
node.initattrs = initattrs
......
......@@ -530,6 +530,10 @@ class Load(Op):
name = "flags",
),
]
init = '''
res->attr.load.volatility = flags & cons_volatile ? volatility_is_volatile : volatility_non_volatile;
res->attr.load.aligned = flags & cons_unaligned ? align_non_aligned : align_is_aligned;
'''
class Minus(Unop):
"""returns the difference between its operands"""
......@@ -637,7 +641,7 @@ class Proj(Op):
dict(
type = "long",
name = "proj",
)
),
]
attr_struct = "proj_attr"
......@@ -756,6 +760,10 @@ class Store(Op):
name = "flags",
),
]
init = '''
res->attr.store.volatility = flags & cons_volatile ? volatility_is_volatile : volatility_non_volatile;
res->attr.store.aligned = flags & cons_unaligned ? align_non_aligned : align_is_aligned;
'''
class Sub(Binop):
"""returns the difference of its operands"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment