diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-11-11 14:22:43 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-11-11 14:22:43 +0000 |
commit | 7700cd858ff97a257d6f48b0d079780f445821da (patch) | |
tree | 65037ebab2d96259aa483e1bd38a87a27b451d5b | |
parent | 0bf5130af0d1c19855f244ae874180ed28f1cb3e (diff) | |
download | gcc-7700cd858ff97a257d6f48b0d079780f445821da.zip gcc-7700cd858ff97a257d6f48b0d079780f445821da.tar.gz gcc-7700cd858ff97a257d6f48b0d079780f445821da.tar.bz2 |
re PR target/67265 ([x86] 'asm' operand has impossible constraints with -fstack-check)
PR target/67265
* ira.c (ira_setup_eliminable_regset): Do not necessarily create the
frame pointer for stack checking if non-call exceptions aren't used.
* config/i386/i386.c (ix86_finalize_stack_realign_flags): Likewise.
From-SVN: r230168
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/ira.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr67265.c | 12 |
4 files changed, 32 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb556d0..57329ed 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,7 +1,14 @@ +2015-11-11 Eric Botcazou <ebotcazou@adacore.com> + + PR target/67265 + * ira.c (ira_setup_eliminable_regset): Do not necessarily create the + frame pointer for stack checking if non-call exceptions aren't used. + * config/i386/i386.c (ix86_finalize_stack_realign_flags): Likewise. + 2015-11-11 Segher Boessenkool <segher@kernel.crashing.org> - * gcc/simplify-rtx.c (simplify_truncation): Simplify TRUNCATE - of AND of [LA]SHIFTRT. + * simplify-rtx.c (simplify_truncation): Simplify TRUNCATE of AND of + [LA]SHIFTRT. 2015-11-11 Martin Liska <mliska@suse.cz> Richard Biener <rguenther@suse.de> @@ -93,8 +100,7 @@ 2015-11-11 Julia Koval <julia.koval@intel.com> - * config/i386/i386.c: Handle "skylake" and - "skylake-avx512". + * config/i386/i386.c: Handle "skylake" and "skylake-avx512". 2015-11-11 Martin Liska <mliska@suse.cz> @@ -2259,9 +2259,12 @@ ira_setup_eliminable_regset (void) frame_pointer_needed = (! flag_omit_frame_pointer || (cfun->calls_alloca && EXIT_IGNORE_STACK) - /* We need the frame pointer to catch stack overflow exceptions - if the stack pointer is moving. */ - || (flag_stack_check && STACK_CHECK_MOVING_SP) + /* We need the frame pointer to catch stack overflow exceptions if + the stack pointer is moving (as for the alloca case just above). */ + || (STACK_CHECK_MOVING_SP + && flag_stack_check + && flag_exceptions + && cfun->can_throw_non_call_exceptions) || crtl->accesses_prior_frames || (SUPPORTS_STACK_ALIGNMENT && crtl->stack_realign_needed) /* We need a frame pointer for all Cilk Plus functions that use diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 42ab86d..78332c1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-11-11 Eric Botcazou <ebotcazou@adacore.com> + + * gcc.target/i386/pr67265.c: New test. + 2015-11-11 Segher Boessenkool <segher@kernel.crashing.org> * gcc.target/powerpc/20050603-3.c: Don't restrict to ilp32. Do more diff --git a/gcc/testsuite/gcc.target/i386/pr67265.c b/gcc/testsuite/gcc.target/i386/pr67265.c new file mode 100644 index 0000000..7827685 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr67265.c @@ -0,0 +1,12 @@ +/* PR target/67265 */ +/* Reduced testcase by Johannes Dewender <gnu@JonnyJD.net> */ + +/* { dg-do compile } */ +/* { dg-options "-O -fstack-check -fPIC" } */ + +int a, b, c, d, e; + +void foo (void) +{ + __asm__("" : "+r"(c), "+r"(e), "+r"(d), "+r"(a) : ""(b), "mg"(foo), "mm"(c)); +} |