From 5e89a381f9bde6b3959d1ddb6ebaa04df2fb2db8 Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Mon, 12 Jul 2004 22:45:14 +0000 Subject: [PATCH] function.c (expand_function_start): Ensure r_save is in Pmode. * function.c (expand_function_start): Ensure r_save is in Pmode. * calls.c (prepare_call_address): Ensure static_chain_value is in Pmode. * builtins.c (expand_builtin_nonlocal_goto): Ensure r_label and r_save_area are in Pmode. * config/ia64/ia64.c (ia64_initialize_trampoline): Ensure addr, fnaddr, and static_chain are in Pmode. From-SVN: r84584 --- gcc/ChangeLog | 10 ++++++++++ gcc/builtins.c | 2 ++ gcc/calls.c | 1 + gcc/config/ia64/ia64.c | 5 +++++ gcc/function.c | 1 + 5 files changed, 19 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 226abd4b29b..1dd10f2f1b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2004-07-12 Steve Ellcey + + * function.c (expand_function_start): Ensure r_save is in Pmode. + * calls.c (prepare_call_address): Ensure static_chain_value is + in Pmode. + * builtins.c (expand_builtin_nonlocal_goto): Ensure r_label and + r_save_area are in Pmode. + * config/ia64/ia64.c (ia64_initialize_trampoline): Ensure addr, + fnaddr, and static_chain are in Pmode. + 2004-07-12 Vladimir Makarov PR target/16445 diff --git a/gcc/builtins.c b/gcc/builtins.c index f8a794db0a7..147cefcfe44 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -794,7 +794,9 @@ expand_builtin_nonlocal_goto (tree arglist) t_save_area = TREE_VALUE (arglist); r_label = expand_expr (t_label, NULL_RTX, VOIDmode, 0); + r_label = convert_memory_address (Pmode, r_label); r_save_area = expand_expr (t_save_area, NULL_RTX, VOIDmode, 0); + r_save_area = convert_memory_address (Pmode, r_save_area); r_fp = gen_rtx_MEM (Pmode, r_save_area); r_sp = gen_rtx_MEM (STACK_SAVEAREA_MODE (SAVE_NONLOCAL), plus_constant (r_save_area, GET_MODE_SIZE (Pmode))); diff --git a/gcc/calls.c b/gcc/calls.c index 79e78f24a30..c54ab48a7d8 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -183,6 +183,7 @@ prepare_call_address (rtx funexp, rtx static_chain_value, if (static_chain_value != 0) { + static_chain_value = convert_memory_address (Pmode, static_chain_value); emit_move_insn (static_chain_rtx, static_chain_value); if (REG_P (static_chain_rtx)) diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 88c50874b2d..3f03cab9697 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -3474,6 +3474,11 @@ ia64_initialize_trampoline (rtx addr, rtx fnaddr, rtx static_chain) } } + /* Make sure addresses are Pmode even if we are in ILP32 mode. */ + addr = convert_memory_address (Pmode, addr); + fnaddr = convert_memory_address (Pmode, fnaddr); + static_chain = convert_memory_address (Pmode, static_chain); + /* Load up our iterator. */ addr_reg = gen_reg_rtx (Pmode); emit_move_insn (addr_reg, addr); diff --git a/gcc/function.c b/gcc/function.c index 6780e355da5..19549b1b800 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4190,6 +4190,7 @@ expand_function_start (tree subr) t_save = build (ARRAY_REF, ptr_type_node, cfun->nonlocal_goto_save_area, integer_zero_node, NULL_TREE, NULL_TREE); r_save = expand_expr (t_save, NULL_RTX, VOIDmode, EXPAND_WRITE); + r_save = convert_memory_address (Pmode, r_save); emit_move_insn (r_save, virtual_stack_vars_rtx); update_nonlocal_goto_save_area (); -- 2.30.2