Commit 5bfb2af2 by H.J. Lu Committed by H.J. Lu

Allow -mpreferred-stack-boundary=3 on x86-64

	PR target/53383
	* doc/invoke.texi: Add a warning for -mpreferred-stack-boundary=3.

	* config/i386/i386.c (ix86_option_override_internal): Allow
	-mpreferred-stack-boundary=3 for 64-bit if SSE is disabled.

	* config/i386/i386.h (MIN_STACK_BOUNDARY): Set to 64 for 64-bit
	if SSE is disabled.

From-SVN: r188893
parent 7735d6c7
2012-06-22 H.J. Lu <hongjiu.lu@intel.com>
PR target/53383
* doc/invoke.texi: Add a warning for -mpreferred-stack-boundary=3.
* config/i386/i386.c (ix86_option_override_internal): Allow
-mpreferred-stack-boundary=3 for 64-bit if SSE is disabled.
* config/i386/i386.h (MIN_STACK_BOUNDARY): Set to 64 for 64-bit
if SSE is disabled.
2012-06-22 Bill Schmidt <wschmidt@linux.ibm.com> 2012-06-22 Bill Schmidt <wschmidt@linux.ibm.com>
* double-int.c (double_int_multiple_of): New function. * double-int.c (double_int_multiple_of): New function.
......
...@@ -3664,7 +3664,7 @@ ix86_option_override_internal (bool main_args_p) ...@@ -3664,7 +3664,7 @@ ix86_option_override_internal (bool main_args_p)
ix86_preferred_stack_boundary = PREFERRED_STACK_BOUNDARY_DEFAULT; ix86_preferred_stack_boundary = PREFERRED_STACK_BOUNDARY_DEFAULT;
if (global_options_set.x_ix86_preferred_stack_boundary_arg) if (global_options_set.x_ix86_preferred_stack_boundary_arg)
{ {
int min = (TARGET_64BIT ? 4 : 2); int min = (TARGET_64BIT ? (TARGET_SSE ? 4 : 3) : 2);
int max = (TARGET_SEH ? 4 : 12); int max = (TARGET_SEH ? 4 : 12);
if (ix86_preferred_stack_boundary_arg < min if (ix86_preferred_stack_boundary_arg < min
...@@ -708,7 +708,7 @@ enum target_cpu_default ...@@ -708,7 +708,7 @@ enum target_cpu_default
#define MAIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32) #define MAIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32)
/* Minimum stack boundary. */ /* Minimum stack boundary. */
#define MIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32) #define MIN_STACK_BOUNDARY (TARGET_64BIT ? (TARGET_SSE ? 128 : 64) : 32)
/* Boundary (in *bits*) on which the stack pointer prefers to be /* Boundary (in *bits*) on which the stack pointer prefers to be
aligned; the compiler cannot rely on having this alignment. */ aligned; the compiler cannot rely on having this alignment. */
......
...@@ -13577,6 +13577,12 @@ Attempt to keep the stack boundary aligned to a 2 raised to @var{num} ...@@ -13577,6 +13577,12 @@ Attempt to keep the stack boundary aligned to a 2 raised to @var{num}
byte boundary. If @option{-mpreferred-stack-boundary} is not specified, byte boundary. If @option{-mpreferred-stack-boundary} is not specified,
the default is 4 (16 bytes or 128 bits). the default is 4 (16 bytes or 128 bits).
@strong{Warning:} When generating code for the x86-64 architecture with
SSE extensions disabled, @option{-mpreferred-stack-boundary=3} can be
used to keep the stack boundary aligned to 8 byte boundary. You must
build all modules with @option{-mpreferred-stack-boundary=3}, including
any libraries. This includes the system libraries and startup modules.
@item -mincoming-stack-boundary=@var{num} @item -mincoming-stack-boundary=@var{num}
@opindex mincoming-stack-boundary @opindex mincoming-stack-boundary
Assume the incoming stack is aligned to a 2 raised to @var{num} byte Assume the incoming stack is aligned to a 2 raised to @var{num} byte
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment