From 479e4d5e1b15ee85a3cd4dbda8e2b2577d298226 Mon Sep 17 00:00:00 2001 From: kenner Date: Tue, 23 Oct 2001 22:59:15 +0000 Subject: * builtins.c (expand_builtin_setjmp): Only call convert_memory_address if needed. (expand_builtin_longjmp, expand_builtin_alloca): Likewise. * except.c (expand_builtin_frob_return_addr): Likewise. (expand_builtin_eh_return): Likewise. * stmt.c (expand_computed_goto): Likewise. * explow.c (memory_address): Likewise. (allocate_dynamic_stack_space): Clean up predicate testing. (probe_stack_range): Convert SIZE to Pmode. * calls.c (rtx_for_function_call): Only call convert_memory_address if needed. Pass function call operand as ptr_mode, not Pmode. * expr.c (expand_assignment): Clean up calls to convert_memory address by only doing so when needed and making offsets Pmode. (store_constructor, expand_expr, expand_expr_unaligned): Likewise. * function.c (assign_parms): Ensure address in MEM for RESULT_DECL is in Pmode, not ptr_mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46448 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/function.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gcc/function.c') diff --git a/gcc/function.c b/gcc/function.c index 08b3fdc709e..f4d0fff2635 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5018,8 +5018,15 @@ assign_parms (fndecl) if (parm == function_result_decl) { tree result = DECL_RESULT (fndecl); - rtx x = gen_rtx_MEM (DECL_MODE (result), DECL_RTL (parm)); + rtx addr = DECL_RTL (parm); + rtx x; +#ifdef POINTERS_EXTEND_UNSIGNED + if (GET_MODE (addr) != Pmode) + addr = convert_memory_address (Pmode, addr); +#endif + + x = gen_rtx_MEM (DECL_MODE (result), addr); set_mem_attributes (x, result, 1); SET_DECL_RTL (result, x); } -- cgit v1.2.1