summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJonas Haag <jonas@lophus.org>2015-12-26 19:42:35 +0100
committerPhilipp Serrer <philipp@serrer.de>2018-01-18 18:08:15 +0100
commit49f15bfdd08c56d2acf7a295ac63e3f2a3992d6e (patch)
tree22d6632ae1fc66b4c889b33ecb57ffd2a5f70798
parent0278632f0e3b30c668534e3e070ec11f36f1be85 (diff)
sparc call: Add X_regular and X_except outs
(This is "amd64 call: Add X_regular and X_except outs" applied to the sparc backend.)
-rw-r--r--ir/be/sparc/sparc_spec.pl3
-rw-r--r--ir/be/sparc/sparc_transform.c11
2 files changed, 10 insertions, 4 deletions
diff --git a/ir/be/sparc/sparc_spec.pl b/ir/be/sparc/sparc_spec.pl
index f8b0dd1..4397315 100644
--- a/ir/be/sparc/sparc_spec.pl
+++ b/ir/be/sparc/sparc_spec.pl
@@ -499,7 +499,8 @@ Call => {
state => "exc_pinned",
in_reqs => "...",
out_reqs => "...",
- outs => [ "M", "stack", "first_result" ],
+ ins => [ "mem", "stack" ],
+ outs => [ "mem", "stack", "X_regular", "X_except", "first_result" ],
attr_type => "sparc_call_attr_t",
constructors => {
imm => {
diff --git a/ir/be/sparc/sparc_transform.c b/ir/be/sparc/sparc_transform.c
index 8d25b76..c1013e1 100644
--- a/ir/be/sparc/sparc_transform.c
+++ b/ir/be/sparc/sparc_transform.c
@@ -1673,7 +1673,7 @@ static void bitcast_float_to_int(dbg_info *dbgi, ir_node *block,
}
}
-static ir_node *gen_Call(ir_node *node)
+static ir_node *gen_Call(ir_node *const node)
{
ir_graph *irg = get_irn_irg(node);
ir_node *callee = get_Call_ptr(node);
@@ -1798,10 +1798,13 @@ static ir_node *gen_Call(ir_node *node)
ir_node *const res = entity ?
new_bd_sparc_Call_imm(dbgi, new_block, in_arity, in, in_req, out_arity, type, entity, 0, aggregate_return) :
new_bd_sparc_Call_reg(dbgi, new_block, in_arity, in, in_req, out_arity, type, aggregate_return);
+ ir_set_throws_exception(res, ir_throws_exception(node));
/* create output register reqs */
- arch_set_irn_register_req_out(res, pn_sparc_Call_M, arch_memory_req);
+ arch_set_irn_register_req_out(res, pn_sparc_Call_mem, arch_memory_req);
arch_copy_irn_out_info(res, pn_sparc_Call_stack, callframe);
+ arch_set_irn_register_req_out(res, pn_sparc_Call_X_regular, arch_exec_req);
+ arch_set_irn_register_req_out(res, pn_sparc_Call_X_except, arch_exec_req);
/* add register requirements for the result regs */
for (size_t r = 0; r < n_ress; ++r) {
@@ -2315,9 +2318,11 @@ static ir_node *gen_Proj_Call(ir_node *node)
switch ((pn_Call) pn) {
case pn_Call_M:
- return be_new_Proj(new_call, pn_sparc_Call_M);
+ return be_new_Proj(new_call, pn_sparc_Call_mem);
case pn_Call_X_regular:
+ return be_new_Proj(new_call, pn_sparc_Call_X_regular);
case pn_Call_X_except:
+ return be_new_Proj(new_call, pn_sparc_Call_X_except);
case pn_Call_T_result:
break;
}