From 4b6c167260f42134dc465ccd05b68d38a3b275d3 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Tue, 23 Oct 2001 18:59:15 -0400 Subject: builtins.c (expand_builtin_setjmp): Only call convert_memory_address if needed. * 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. From-SVN: r46448 --- gcc/calls.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'gcc/calls.c') diff --git a/gcc/calls.c b/gcc/calls.c index 4969cd10..a0c451c 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1673,21 +1673,19 @@ rtx_for_function_call (fndecl, exp) { rtx funaddr; push_temp_slots (); - funaddr = funexp = - expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0); + funaddr = funexp + = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0); pop_temp_slots (); /* FUNEXP can't be BLKmode. */ /* Check the function is executable. */ if (current_function_check_memory_usage) { #ifdef POINTERS_EXTEND_UNSIGNED - /* It might be OK to convert funexp in place, but there's - a lot going on between here and when it happens naturally - that this seems safer. */ - funaddr = convert_memory_address (Pmode, funexp); + if (GET_MODE (funexp) != ptr_mode) + funaddr = convert_memory_address (ptr_mode, funexp); #endif emit_library_call (chkr_check_exec_libfunc, LCT_CONST_MAKE_BLOCK, - VOIDmode, 1, funaddr, Pmode); + VOIDmode, 1, funaddr, ptr_mode); } emit_queue (); } -- cgit v1.1