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 36d5ec05a1f2cbfb9f95e221af1483e69fbd3e96..26c388b35656f0e259192af77a98fae1f8ef9cf1 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 aeafd0d5d21bed8ca72801634f14e1c367137f8c..270ee5578723826ee42e9de8a3d3864134a9a00b 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 7b4805218c012fa131dfc78bc72155f4c8de76b1..04f0c1866359a39437a4b92ef54792241d1f89be 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 b7fe5c0d724df0a2965ab82bcb563271a55783df..887a801bbd8bd9445bc349b365462c38850e5edc 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
 }