summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bevarargs.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-10-18 11:19:12 +0200
committerMatthias Braun <matze@braunis.de>2015-10-18 11:45:15 +0200
commitd013e55796cb01d63f92a6866e9e956466aec462 (patch)
tree3f79eb9bf5d0ea4ddb7ed6fc520c335e9a9cbab8 /ir/be/bevarargs.c
parent1f55516e34a6debbb2fe057ebac85114a8dd4ae6 (diff)
Enfore Add/Sub pointer, offset to use reference_offset_mode
Diffstat (limited to 'ir/be/bevarargs.c')
-rw-r--r--ir/be/bevarargs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ir/be/bevarargs.c b/ir/be/bevarargs.c
index 2610252..0f333f3 100644
--- a/ir/be/bevarargs.c
+++ b/ir/be/bevarargs.c
@@ -43,10 +43,11 @@ void be_default_lower_va_arg(ir_node *node)
new_mem = node_mem;
}
- const backend_params *be_params = be_get_backend_param();
- unsigned round_up = round_up2(get_type_size_bytes(aptype), be_params->stack_param_align);
- ir_node *const diff_const = new_r_Const_long(irg, mode_Iu, round_up);
- ir_node *const new_ap = new_rd_Add(dbgi, block, ap, diff_const, mode_P);
+ backend_params const *const be_params = be_get_backend_param();
+ unsigned round_up = round_up2(get_type_size_bytes(aptype), be_params->stack_param_align);
+ ir_mode *const offset_mode = get_reference_offset_mode(mode_P);
+ ir_node *const offset = new_r_Const_long(irg, offset_mode, round_up);
+ ir_node *const new_ap = new_rd_Add(dbgi, block, ap, offset, mode_P);
ir_node *const in[] = { new_mem, res, new_ap };
turn_into_tuple(node, ARRAY_SIZE(in), in);