From ea6c2b0e960aa4be55b65a4f4954ac7b461d4b55 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 4 Aug 2011 12:41:02 +0930 Subject: [PATCH] rs6000.c (rs6000_emit_epilogue): Simplify use_backchain_to_restore_sp initialisation. * config/rs6000/rs6000.c (rs6000_emit_epilogue): Simplify use_backchain_to_restore_sp initialisation. (rs6000_legitimate_offset_address_p): Simplify offset test. From-SVN: r177309 --- gcc/ChangeLog | 6 ++++++ gcc/config/rs6000/rs6000.c | 7 ++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 60ee93a75e1..923e8c97fd3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-08-04 Alan Modra + + * config/rs6000/rs6000.c (rs6000_emit_epilogue): Simplify + use_backchain_to_restore_sp initialisation. + (rs6000_legitimate_offset_address_p): Simplify offset test. + 2011-08-03 Richard Henderson * config/spu/spu.md: Use define_c_enum instead of define_constants. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 29965138de6..a1141f1416d 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5392,7 +5392,7 @@ rs6000_legitimate_offset_address_p (enum machine_mode mode, rtx x, int strict) } offset += 0x8000; - return (offset < 0x10000) && (offset + extra < 0x10000); + return offset < 0x10000 - extra; } bool @@ -20712,10 +20712,7 @@ rs6000_emit_epilogue (int sibcall) here will not trigger at the moment; We don't actually need a frame pointer for alloca, but the generic parts of the compiler give us one anyway. */ - use_backchain_to_restore_sp = (info->total_size > 32767 - || info->total_size - + (info->lr_save_p ? info->lr_save_offset : 0) - > 32767 + use_backchain_to_restore_sp = (info->total_size > 32767 - info->lr_save_offset || (cfun->calls_alloca && !frame_pointer_needed)); restore_lr = (info->lr_save_p -- 2.30.2