Blame SOURCES/gcc48-rh1469697-5.patch

4dd737
commit ea2b372d666ec1105abf4ef5418d92d612283e88
4dd737
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
4dd737
Date:   Wed Sep 20 05:23:51 2017 +0000
4dd737
4dd737
            * function.c (dump_stack_clash_frame_info): New function.
4dd737
            * function.h (dump_stack_clash_frame_info): Prototype.
4dd737
            (enum stack_clash_probes): New enum.
4dd737
    
4dd737
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@252997 138bc75d-0d04-0410-961f-82ee72b054a4
4dd737
4dd737
diff --git a/gcc/function.c b/gcc/function.c
4dd737
index 76baf307984..9b395aebcb3 100644
4dd737
--- a/gcc/function.c
4dd737
+++ b/gcc/function.c
4dd737
@@ -5263,6 +5263,58 @@ get_arg_pointer_save_area (void)
4dd737
   return ret;
4dd737
 }
4dd737
 
4dd737
+
4dd737
+/* If debugging dumps are requested, dump information about how the
4dd737
+   target handled -fstack-check=clash for the prologue.
4dd737
+
4dd737
+   PROBES describes what if any probes were emitted.
4dd737
+
4dd737
+   RESIDUALS indicates if the prologue had any residual allocation
4dd737
+   (i.e. total allocation was not a multiple of PROBE_INTERVAL).  */
4dd737
+
4dd737
+void
4dd737
+dump_stack_clash_frame_info (enum stack_clash_probes probes, bool residuals)
4dd737
+{
4dd737
+  if (!dump_file)
4dd737
+    return;
4dd737
+
4dd737
+  switch (probes)
4dd737
+    {
4dd737
+    case NO_PROBE_NO_FRAME:
4dd737
+      fprintf (dump_file,
4dd737
+	       "Stack clash no probe no stack adjustment in prologue.\n");
4dd737
+      break;
4dd737
+    case NO_PROBE_SMALL_FRAME:
4dd737
+      fprintf (dump_file,
4dd737
+	       "Stack clash no probe small stack adjustment in prologue.\n");
4dd737
+      break;
4dd737
+    case PROBE_INLINE:
4dd737
+      fprintf (dump_file, "Stack clash inline probes in prologue.\n");
4dd737
+      break;
4dd737
+    case PROBE_LOOP:
4dd737
+      fprintf (dump_file, "Stack clash probe loop in prologue.\n");
4dd737
+      break;
4dd737
+    }
4dd737
+
4dd737
+  if (residuals)
4dd737
+    fprintf (dump_file, "Stack clash residual allocation in prologue.\n");
4dd737
+  else
4dd737
+    fprintf (dump_file, "Stack clash no residual allocation in prologue.\n");
4dd737
+
4dd737
+  if (frame_pointer_needed)
4dd737
+    fprintf (dump_file, "Stack clash frame pointer needed.\n");
4dd737
+  else
4dd737
+    fprintf (dump_file, "Stack clash no frame pointer needed.\n");
4dd737
+
4dd737
+  if (TREE_THIS_VOLATILE (cfun->decl))
4dd737
+    fprintf (dump_file,
4dd737
+	     "Stack clash noreturn prologue, assuming no implicit"
4dd737
+	     " probes in caller.\n");
4dd737
+  else
4dd737
+    fprintf (dump_file,
4dd737
+	     "Stack clash not noreturn prologue.\n");
4dd737
+}
4dd737
+
4dd737
 /* Add a list of INSNS to the hash HASHP, possibly allocating HASHP
4dd737
    for the first time.  */
4dd737
 
4dd737
diff --git a/gcc/function.h b/gcc/function.h
4dd737
index 89d71e592dd..ffea1e564ba 100644
4dd737
--- a/gcc/function.h
4dd737
+++ b/gcc/function.h
4dd737
@@ -712,6 +712,16 @@ extern void instantiate_decl_rtl (rtx x);
4dd737
    and create duplicate blocks.  */
4dd737
 extern void reorder_blocks (void);
4dd737
 
4dd737
+enum stack_clash_probes {
4dd737
+  NO_PROBE_NO_FRAME,
4dd737
+  NO_PROBE_SMALL_FRAME,
4dd737
+  PROBE_INLINE,
4dd737
+  PROBE_LOOP
4dd737
+};
4dd737
+
4dd737
+extern void dump_stack_clash_frame_info (enum stack_clash_probes, bool);
4dd737
+
4dd737
+
4dd737
 /* Set BLOCK_NUMBER for all the blocks in FN.  */
4dd737
 extern void number_blocks (tree);
4dd737