From 04572513c7bf1b351b95c2f6ecf78fec8cbe306a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 6 Dec 1999 20:31:13 +0100 Subject: [PATCH] calls.c (save_fixed_argument_area): If save_mode is BLKmode, always use move_by_pieces to avoid infinite recursion. * 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 | 4 ++++ gcc/calls.c | 17 +++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 67a0376ec8f..f2c318137c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -13,6 +13,10 @@ * 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 * fold-const.c (optimize_bit_field_compare): Only use one mode diff --git a/gcc/calls.c b/gcc/calls.c index 40b359ded67..33b425d8784 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -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 -- 2.30.2