summaryrefslogtreecommitdiff
path: root/gcc/config/i386
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-06 11:50:47 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-06 11:50:47 +0000
commit9a56363e14dfb9c83b950c5d1f6fe04bf227624b (patch)
treeea60216ac576d7157e4692639d99d39d9a125347 /gcc/config/i386
parent8697277d3818237717b7b73cd2445804d7a93a1d (diff)
downloadgcc-9a56363e14dfb9c83b950c5d1f6fe04bf227624b.tar.gz
Allow -mincoming-stack-boundary=3 with -mno-sse
Similar to -mpreferred-stack-boundary=3, -mincoming-stack-boundary=3 is allowed with -mno-sse in 64-bit mode. gcc/ PR target/53383 * config/i386/i386.c (ix86_option_override_internal): Allow -mincoming-stack-boundary=3 for 64-bit if SSE is disabled. gcc/testsuite/ PR target/53383 * gcc.target/i386/pr53383-1.c: New file. * gcc.target/i386/pr53383-2.c: Likewise. * gcc.target/i386/pr53383-3.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225452 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386')
-rw-r--r--gcc/config/i386/i386.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7d26e8c2bd0..0a5dfd3554d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4085,12 +4085,13 @@ ix86_option_override_internal (bool main_args_p,
ix86_incoming_stack_boundary = ix86_default_incoming_stack_boundary;
if (opts_set->x_ix86_incoming_stack_boundary_arg)
{
- if (opts->x_ix86_incoming_stack_boundary_arg
- < (TARGET_64BIT_P (opts->x_ix86_isa_flags) ? 4 : 2)
+ int min = (TARGET_64BIT_P (opts->x_ix86_isa_flags)
+ ? (TARGET_SSE_P (opts->x_ix86_isa_flags) ? 4 : 3) : 2);
+
+ if (opts->x_ix86_incoming_stack_boundary_arg < min
|| opts->x_ix86_incoming_stack_boundary_arg > 12)
error ("-mincoming-stack-boundary=%d is not between %d and 12",
- opts->x_ix86_incoming_stack_boundary_arg,
- TARGET_64BIT_P (opts->x_ix86_isa_flags) ? 4 : 2);
+ opts->x_ix86_incoming_stack_boundary_arg, min);
else
{
ix86_user_incoming_stack_boundary