OSDN Git Service

* config/rs6000/rs6000.c (rs6000_emit_epilogue): Simplify
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Aug 2011 03:11:02 +0000 (03:11 +0000)
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Aug 2011 03:11:02 +0000 (03:11 +0000)
use_backchain_to_restore_sp initialisation.
(rs6000_legitimate_offset_address_p): Simplify offset test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177309 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 60ee93a..923e8c9 100644 (file)
@@ -1,3 +1,9 @@
+2011-08-04  Alan Modra  <amodra@gmail.com>
+
+       * 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  <rth@redhat.com>
 
        * config/spu/spu.md: Use define_c_enum instead of define_constants.
index 2996513..a1141f1 100644 (file)
@@ -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