calls.c (save_fixed_argument_area): If save_mode is BLKmode, always use move_by_piece...
authorJakub Jelinek <jakub@redhat.com>
Mon, 6 Dec 1999 19:31:13 +0000 (20:31 +0100)
committerDavid S. Miller <davem@gcc.gnu.org>
Mon, 6 Dec 1999 19:31:13 +0000 (11:31 -0800)
* calls.c (save_fixed_argument_area): If save_mode is BLKmode,
always use move_by_pieces to avoid infinite recursion.
(restore_fixed_argument_area): Likewise.

From-SVN: r30805

gcc/ChangeLog
gcc/calls.c

index 67a0376ec8f3505ad7f04ced7bc3defd12406e93..f2c318137c41a0aefa2d512dbe7760429fd7524a 100644 (file)
        * config/sparc/sparc.c (input_operand): Allow HImode and QImode
        valid sethi operations when TARGET_ARCH64.
 
+       * calls.c (save_fixed_argument_area): If save_mode is BLKmode,
+       always use move_by_pieces to avoid infinite recursion.
+       (restore_fixed_argument_area): Likewise.
+
 Mon Dec  6 12:24:52 1999  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * fold-const.c (optimize_bit_field_compare): Only use one mode
index 40b359ded6775a1acfb137b8a900716b962e4d8c..33b425d87844004cdbc38bb0506e62d8dedfcd87 100644 (file)
@@ -743,9 +743,11 @@ save_fixed_argument_area (reg_parm_stack_space, argblock,
       if (save_mode == BLKmode)
        {
          save_area = assign_stack_temp (BLKmode, num_to_save, 0);
-         emit_block_move (validize_mem (save_area), stack_area,
-                          GEN_INT (num_to_save),
-                          PARM_BOUNDARY / BITS_PER_UNIT);
+         /* Cannot use emit_block_move here because it can be done by a library
+            call which in turn gets into this place again and deadly infinite
+            recursion happens.  */
+         move_by_pieces (validize_mem (save_area), stack_area, num_to_save,
+                         PARM_BOUNDARY / BITS_PER_UNIT);
        }
       else
        {
@@ -781,9 +783,12 @@ restore_fixed_argument_area (save_area, argblock, high_to_save, low_to_save)
   if (save_mode != BLKmode)
     emit_move_insn (stack_area, save_area);
   else
-    emit_block_move (stack_area, validize_mem (save_area),
-                    GEN_INT (high_to_save - low_to_save + 1),
-                    PARM_BOUNDARY / BITS_PER_UNIT);
+    /* Cannot use emit_block_move here because it can be done by a library
+       call which in turn gets into this place again and deadly infinite
+       recursion happens.  */
+    move_by_pieces (stack_area, validize_mem (save_area),
+                   high_to_save - low_to_save + 1,
+                   PARM_BOUNDARY / BITS_PER_UNIT);
 }
 #endif