summaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-01 17:17:00 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-01 17:17:00 +0000
commit9d4b544c190a4ce77a2805aa37ff671b32d94811 (patch)
tree5ad9cad28cff1f48e3790a763b71d7da1961d00a /gcc/builtins.c
parentb8d2bcdd743853cfef58c1c0d7ee7f518c098416 (diff)
downloadgcc-9d4b544c190a4ce77a2805aa37ff671b32d94811.tar.gz
* builtins.c (expand_builtin_apply_args_1) [STACK_GROWS_DOWNWARD]:
Call force_operand on plus_constant result. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75306 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index c5af18d7182..df93f48238e 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -1128,8 +1128,11 @@ expand_builtin_apply_args_1 (void)
tem = copy_to_reg (virtual_incoming_args_rtx);
#ifdef STACK_GROWS_DOWNWARD
/* We need the pointer as the caller actually passed them to us, not
- as we might have pretended they were passed. */
- tem = plus_constant (tem, current_function_pretend_args_size);
+ as we might have pretended they were passed. Make sure it's a valid
+ operand, as emit_move_insn isn't expected to handle a PLUS. */
+ tem
+ = force_operand (plus_constant (tem, current_function_pretend_args_size),
+ NULL_RTX);
#endif
emit_move_insn (adjust_address (registers, Pmode, 0), tem);