diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2015-10-21 10:43:44 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2015-10-21 10:43:44 +0200 |
commit | dc3cf66b06e1357d69e5ad9293449369064f254e (patch) | |
tree | 55d91e3665dafad7211c3f911bda6a3849def6d4 | |
parent | 87961d1b29b5ecfd8cb300a8470141bcd0a51f33 (diff) | |
download | gcc-dc3cf66b06e1357d69e5ad9293449369064f254e.zip gcc-dc3cf66b06e1357d69e5ad9293449369064f254e.tar.gz gcc-dc3cf66b06e1357d69e5ad9293449369064f254e.tar.bz2 |
re PR target/68018 (ICE: in ix86_compute_frame_layout, at config/i386/i386.c:11308 with -mstackrealign)
PR target/68018
* config/i386/i386.c (ix86_compute_frame_layout): Realign the stack
for 64-bit MS_ABI targets also when default incoming stack boundary
is overriden.
testsuite/ChangeLog:
PR target/68018
* gcc.target/i386/pr68018.c: New test.
From-SVN: r229120
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr68018.c | 10 |
4 files changed, 32 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6e30cdb..949fb3a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-10-21 Uros Bizjak <ubizjak@gmail.com> + + PR target/68018 + * config/i386/i386.c (ix86_compute_frame_layout): Realign the stack + for 64-bit MS_ABI targets also when default incoming stack boundary + is overriden. + 2015-10-21 Richard Biener <rguenther@suse.de> * tree-ssa-sccvn.c (cond_stmts_equal_p): Compare two GIMPLE diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index c800145..6fd4a56 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -11271,11 +11271,14 @@ ix86_compute_frame_layout (struct ix86_frame *frame) frame->nregs = ix86_nsaved_regs (); frame->nsseregs = ix86_nsaved_sseregs (); - /* 64-bit MS ABI seem to require stack alignment to be always 16 except for - function prologues and leaf. */ + /* 64-bit MS ABI seem to require stack alignment to be always 16, + except for function prologues, leaf functions and when the defult + incoming stack boundary is overriden at command line or via + force_align_arg_pointer attribute. */ if ((TARGET_64BIT_MS_ABI && crtl->preferred_stack_boundary < 128) && (!crtl->is_leaf || cfun->calls_alloca != 0 - || ix86_current_function_calls_tls_descriptor)) + || ix86_current_function_calls_tls_descriptor + || ix86_incoming_stack_boundary < 128)) { crtl->preferred_stack_boundary = 128; crtl->stack_alignment_needed = 128; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9c09d65..7b3afbb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-10-21 Uros Bizjak <ubizjak@gmail.com> + + PR target/68018 + * gcc.target/i386/pr68018.c: New test. + 2015-10-21 Richard Biener <rguenther@suse.de> PR middle-end/68031 @@ -202,7 +207,7 @@ * gcc.dg/tree-ssa/ssa-dom-thread-2e.c: Likewise. * gcc.dg/tree-ssa/ssa-dom-thread-2f.c: Likewise. - PR testsuite/67959 + PR testsuite/67959 * gcc.dg/tree-ssa/ssa-thread-13.c: Avoid bitfield assumptions. 2015-10-14 Marek Polacek <polacek@redhat.com> @@ -385,9 +390,9 @@ 2015-10-09 Martin Jambor <mjambor@suse.cz> - tree-optimization/67794 - * gcc.dg/ipa/ipa-sra-10.c: Nw test. - * gcc.dg/torture/pr67794.c: Likewise. + PR tree-optimization/67794 + * gcc.dg/ipa/ipa-sra-10.c: New test. + * gcc.dg/torture/pr67794.c: Likewise. 2015-10-09 Alexandre Oliva <aoliva@redhat.com> diff --git a/gcc/testsuite/gcc.target/i386/pr68018.c b/gcc/testsuite/gcc.target/i386/pr68018.c new file mode 100644 index 0000000..a0fa21e --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr68018.c @@ -0,0 +1,10 @@ +/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ +/* { dg-options "-O -mabi=ms -mstackrealign" } */ + +typedef float V __attribute__ ((vector_size (16))); + +int fn1 (V * x) +{ + V a = *x; + return a[0]; +} |