aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2017-11-03 11:14:23 -0600
committerJeff Law <law@gcc.gnu.org>2017-11-03 11:14:23 -0600
commit74a6366d23c21709744b8f5cd91043a742571b09 (patch)
treeb68114155faedffbe1edb6e0aba03d5afa0c31c2
parentece615ecc6ebbc33fbe0ccb024f3c79ad23789bd (diff)
downloadgcc-74a6366d23c21709744b8f5cd91043a742571b09.zip
gcc-74a6366d23c21709744b8f5cd91043a742571b09.tar.gz
gcc-74a6366d23c21709744b8f5cd91043a742571b09.tar.bz2
i386.c (ix86_expand_prologue): Tighten assert for int_registers_saved.
* config/i386/i386.c (ix86_expand_prologue): Tighten assert for int_registers_saved. From-SVN: r254386
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/config/i386/i386.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 949f3cb..9082b85 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 1cf1e2b..25b28a1 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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)
{