diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-10-23 18:59:15 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-10-23 18:59:15 -0400 |
commit | 4b6c167260f42134dc465ccd05b68d38a3b275d3 (patch) | |
tree | fa0e244bdad0d095044fbe7bb7bb53c3b667a4bb /gcc/expr.c | |
parent | 91dc3130bf8964ab890918269fc3f69539c42bb8 (diff) | |
download | gcc-4b6c167260f42134dc465ccd05b68d38a3b275d3.zip gcc-4b6c167260f42134dc465ccd05b68d38a3b275d3.tar.gz gcc-4b6c167260f42134dc465ccd05b68d38a3b275d3.tar.bz2 |
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
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -3732,13 +3732,12 @@ expand_assignment (to, from, want_value, suggest_reg) abort (); if (GET_MODE (offset_rtx) != ptr_mode) - { + offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0); + #ifdef POINTERS_EXTEND_UNSIGNED - offset_rtx = convert_memory_address (ptr_mode, offset_rtx); -#else - offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0); + if (GET_MODE (offset_rtx) != Pmode) + offset_rtx = convert_memory_address (Pmode, offset_rtx); #endif - } /* A constant address in TO_RTX can have VOIDmode, we must not try to call force_reg for that case. Avoid that case. */ @@ -4637,7 +4636,8 @@ store_constructor (exp, target, align, cleared, size) offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0); #ifdef POINTERS_EXTEND_UNSIGNED - offset_rtx = convert_memory_address (Pmode, offset_rtx); + if (GET_MODE (offset_rtx) != Pmode) + offset_rtx = convert_memory_address (Pmode, offset_rtx); #endif to_rtx = offset_address (to_rtx, offset_rtx, @@ -7044,7 +7044,8 @@ expand_expr (exp, target, tmode, modifier) offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0); #ifdef POINTERS_EXTEND_UNSIGNED - offset_rtx = convert_memory_address (ptr_mode, offset_rtx); + if (GET_MODE (offset_rtx) != Pmode) + offset_rtx = convert_memory_address (Pmode, offset_rtx); #endif /* A constant address in OP0 can have VOIDmode, we must not try @@ -9057,7 +9058,8 @@ expand_expr_unaligned (exp, palign) offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0); #ifdef POINTERS_EXTEND_UNSIGNED - offset_rtx = convert_memory_address (ptr_mode, offset_rtx); + if (GET_MODE (offset_rtx) != Pmode) + offset_rtx = convert_memory_address (Pmode, offset_rtx); #endif op0 = offset_address (op0, offset_rtx, |