]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
builtins.c (expand_builtin_apply_args_1): Call force_operand on plus_constant result.
authorHans-Peter Nilsson <hp@bitrange.com>
Thu, 1 Jan 2004 17:17:00 +0000 (17:17 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Thu, 1 Jan 2004 17:17:00 +0000 (17:17 +0000)
* builtins.c (expand_builtin_apply_args_1) [STACK_GROWS_DOWNWARD]:
Call force_operand on plus_constant result.

From-SVN: r75306

gcc/ChangeLog
gcc/builtins.c

index 227149518a9a811d0384ae05cf6e700034ff8f00..7187c9116decf51006182dcc79d7b510766f5c40 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-01  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * builtins.c (expand_builtin_apply_args_1) [STACK_GROWS_DOWNWARD]:
+       Call force_operand on plus_constant result.
+
 2004-01-01  Jan Hubicka  <jh@suse.cz>
 
        * expmed.c (store_bit_field, extract_bit_field): Use new named patterns
index c5af18d7182cc2a6f9cccdaff140b3c97dd7c660..df93f48238e6489ce5d91019af51ab991d841cb1 100644 (file)
@@ -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);