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

gen_ir: Only set default mode to mode_T if multiple outputs are specified

parent 459c0c85
...@@ -232,6 +232,7 @@ class Builtin: ...@@ -232,6 +232,7 @@ class Builtin:
("M", "memory result"), ("M", "memory result"),
# results follow here # results follow here
] ]
mode = "mode_T"
flags = [ "uses_memory" ] flags = [ "uses_memory" ]
attrs = [ attrs = [
Attribute("kind", type="ir_builtin_kind", comment="kind of builtin"), Attribute("kind", type="ir_builtin_kind", comment="kind of builtin"),
...@@ -318,6 +319,7 @@ class Switch: ...@@ -318,6 +319,7 @@ class Switch:
outs = [ outs = [
("default", "control flow if no other case matches"), ("default", "control flow if no other case matches"),
] ]
mode = "mode_T"
flags = [ "cfopcode", "forking" ] flags = [ "cfopcode", "forking" ]
pinned = "yes" pinned = "yes"
attrs = [ attrs = [
......
...@@ -111,7 +111,7 @@ def setnodedefaults(node): ...@@ -111,7 +111,7 @@ def setnodedefaults(node):
node.doc = trim_docstring(node.__doc__) node.doc = trim_docstring(node.__doc__)
else: else:
node.doc = "" node.doc = ""
if hasattr(node, "outs"): if hasattr(node, "outs") and len(node.outs) > 1:
node.mode = "mode_T" node.mode = "mode_T"
if "start_block" in node.flags: if "start_block" in node.flags:
node.block = "get_irg_start_block(irg)" node.block = "get_irg_start_block(irg)"
......
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