i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix dump output if the only stack...
authorJeff Law <law@gcc.gnu.org>
Thu, 21 Sep 2017 22:03:59 +0000 (16:03 -0600)
committerJeff Law <law@gcc.gnu.org>
Thu, 21 Sep 2017 22:03:59 +0000 (16:03 -0600)
* config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
Fix dump output if the only stack space is for pushed registers.

* lib/target-supports.exp
(check_effective_target_frame_pointer_for_non_leaf): Add
case for x86 Solaris.

From-SVN: r253082

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index 36d5ec0..26c388b 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-21  Jeff Law  <law@redhat.com>
+
+       * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
+       Fix dump output if the only stack space is for pushed registers.
+
 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
 
        * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
index aeafd0d..270ee55 100644 (file)
@@ -13946,7 +13946,13 @@ ix86_adjust_stack_and_probe_stack_clash (const HOST_WIDE_INT size)
      no probes are needed.  */
   if (!size)
     {
-      dump_stack_clash_frame_info (NO_PROBE_NO_FRAME, false);
+      /* However, the allocation of space via pushes for register
+        saves could be viewed as allocating space, but without the
+        need to probe.  */
+      if (m->frame.nregs || m->frame.nsseregs || frame_pointer_needed)
+        dump_stack_clash_frame_info (NO_PROBE_SMALL_FRAME, true);
+      else
+       dump_stack_clash_frame_info (NO_PROBE_NO_FRAME, false);
       return;
     }
 
index 7b48052..04f0c18 100644 (file)
@@ -1,3 +1,9 @@
+2017-09-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * lib/target-supports.exp
+       (check_effective_target_frame_pointer_for_non_leaf): Add
+       case for x86 Solaris.
+
 2017-09-21  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/78512
index b7fe5c0..887a801 100644 (file)
@@ -8657,6 +8657,12 @@ proc check_effective_target_frame_pointer_for_non_leaf { } {
   if { [istarget aarch*-*-*] } {
        return 1
   }
+
+  # Solaris/x86 defaults to -fno-omit-frame-pointer.
+  if { [istarget i?86-*-solaris*] || [istarget x86_64-*-solaris*] } {
+    return 1
+  }
+
   return 0
 }