Blame SOURCES/gcc48-rh1469697-5.patch

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