i386.c (ix86_expand_prologue): Tighten assert for int_registers_saved.
authorJeff Law <law@redhat.com>
Fri, 3 Nov 2017 17:14:23 +0000 (11:14 -0600)
committerJeff Law <law@gcc.gnu.org>
Fri, 3 Nov 2017 17:14:23 +0000 (11:14 -0600)
* config/i386/i386.c (ix86_expand_prologue): Tighten assert
for int_registers_saved.

From-SVN: r254386

gcc/ChangeLog
gcc/config/i386/i386.c

index 949f3cb5a6f6703477fde00e39dce952495841f2..9082b8529c71a0efe67464b06ee852daee1e1f94 100644 (file)
@@ -6,6 +6,9 @@
 
 2017-11-03  Jeff Law  <law@redhat.com>
 
+       * config/i386/i386.c (ix86_expand_prologue): Tighten assert
+       for int_registers_saved.
+
        * cfganal.c (single_pred_edge_ignoring_loop_edges): New function
        extracted from tree-ssa-dom.c.
        * cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype.
index 1cf1e2b27a669649e304e5a27566c72fd7e2a00f..25b28a1a0886aa76615e1796c526df2fc390aedc 100644 (file)
@@ -13167,8 +13167,12 @@ ix86_expand_prologue (void)
       && (flag_stack_check == STATIC_BUILTIN_STACK_CHECK
          || flag_stack_clash_protection))
     {
-      /* We expect the GP registers to be saved when probes are used.  */
-      gcc_assert (int_registers_saved);
+      /* This assert wants to verify that integer registers were saved
+        prior to probing.  This is necessary when probing may be implemented
+        as a function call (Windows).  It is not necessary for stack clash
+        protection probing.  */
+      if (!flag_stack_clash_protection)
+       gcc_assert (int_registers_saved);
 
       if (flag_stack_clash_protection)
        {