Blame SOURCES/gcc48-rh1469697-10.patch

85359c
commit c22c3dee4bbf4a99b234307c63e4845052a15890
85359c
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
85359c
Date:   Thu Sep 21 22:03:59 2017 +0000
85359c
85359c
            * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
85359c
            Fix dump output if the only stack space is for pushed registers.
85359c
    
85359c
            * lib/target-supports.exp
85359c
            (check_effective_target_frame_pointer_for_non_leaf): Add
85359c
            case for x86 Solaris.
85359c
    
85359c
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253082 138bc75d-0d04-0410-961f-82ee72b054a4
85359c
85359c
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
85359c
index a9072f58f50..d8a225195ae 100644
85359c
--- a/gcc/config/i386/i386.c
85359c
+++ b/gcc/config/i386/i386.c
85359c
@@ -9856,7 +9856,16 @@ ix86_adjust_stack_and_probe_stack_clash (const HOST_WIDE_INT size)
85359c
      no probes are needed.  */
85359c
   if (!size)
85359c
     {
85359c
-      dump_stack_clash_frame_info (NO_PROBE_NO_FRAME, false);
85359c
+      struct ix86_frame frame;
85359c
+      ix86_compute_frame_layout (&frame);
85359c
+
85359c
+      /* However, the allocation of space via pushes for register
85359c
+	 saves could be viewed as allocating space, but without the
85359c
+	 need to probe.  */
85359c
+      if (frame.nregs || frame.nsseregs || frame_pointer_needed)
85359c
+        dump_stack_clash_frame_info (NO_PROBE_SMALL_FRAME, true);
85359c
+      else
85359c
+	dump_stack_clash_frame_info (NO_PROBE_NO_FRAME, false);
85359c
       return;
85359c
     }
85359c
 
85359c
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
85359c
index f24c5c6e0ac..7c126e4122b 100644
85359c
--- a/gcc/testsuite/lib/target-supports.exp
85359c
+++ b/gcc/testsuite/lib/target-supports.exp
85359c
@@ -5439,6 +5439,12 @@ proc check_effective_target_frame_pointer_for_non_leaf { } {
85359c
   if { [istarget aarch*-*-*] } {
85359c
 	return 1
85359c
   }
85359c
+
85359c
+  # Solaris/x86 defaults to -fno-omit-frame-pointer.
85359c
+  if { [istarget i?86-*-solaris*] || [istarget x86_64-*-solaris*] } {
85359c
+    return 1
85359c
+  }
85359c
+
85359c
   return 0
85359c
 }
85359c