Commit de1132d1 by H.J. Lu

i386.c (override_options): Replace ABI_STACK_BOUNDARY with MIN_STACK_BOUNDARY.

2008-08-01  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (override_options): Replace ABI_STACK_BOUNDARY
	with MIN_STACK_BOUNDARY.
	(ix86_update_stack_boundary): Likewise.
	(ix86_expand_prologue): Assert MIN_STACK_BOUNDARY instead of
	STACK_BOUNDARY.

	* config/i386/i386.h (ABI_STACK_BOUNDARY): Renamed to ...
	(MIN_STACK_BOUNDARY): This.

From-SVN: r138517
parent 62bb3fdb
...@@ -3045,9 +3045,9 @@ override_options (bool main_args_p) ...@@ -3045,9 +3045,9 @@ override_options (bool main_args_p)
ix86_force_align_arg_pointer = STACK_REALIGN_DEFAULT; ix86_force_align_arg_pointer = STACK_REALIGN_DEFAULT;
/* Validate -mincoming-stack-boundary= value or default it to /* Validate -mincoming-stack-boundary= value or default it to
ABI_STACK_BOUNDARY/PREFERRED_STACK_BOUNDARY. */ MIN_STACK_BOUNDARY/PREFERRED_STACK_BOUNDARY. */
if (ix86_force_align_arg_pointer) if (ix86_force_align_arg_pointer)
ix86_default_incoming_stack_boundary = ABI_STACK_BOUNDARY; ix86_default_incoming_stack_boundary = MIN_STACK_BOUNDARY;
else else
ix86_default_incoming_stack_boundary = PREFERRED_STACK_BOUNDARY; ix86_default_incoming_stack_boundary = PREFERRED_STACK_BOUNDARY;
ix86_incoming_stack_boundary = ix86_default_incoming_stack_boundary; ix86_incoming_stack_boundary = ix86_default_incoming_stack_boundary;
...@@ -7520,10 +7520,10 @@ ix86_update_stack_boundary (void) ...@@ -7520,10 +7520,10 @@ ix86_update_stack_boundary (void)
/* Incoming stack alignment can be changed on individual functions /* Incoming stack alignment can be changed on individual functions
via force_align_arg_pointer attribute. We use the smallest via force_align_arg_pointer attribute. We use the smallest
incoming stack boundary. */ incoming stack boundary. */
if (ix86_incoming_stack_boundary > ABI_STACK_BOUNDARY if (ix86_incoming_stack_boundary > MIN_STACK_BOUNDARY
&& lookup_attribute (ix86_force_align_arg_pointer_string, && lookup_attribute (ix86_force_align_arg_pointer_string,
TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))))
ix86_incoming_stack_boundary = ABI_STACK_BOUNDARY; ix86_incoming_stack_boundary = MIN_STACK_BOUNDARY;
/* Stack at entrance of main is aligned by runtime. We use the /* Stack at entrance of main is aligned by runtime. We use the
smallest incoming stack boundary. */ smallest incoming stack boundary. */
...@@ -7710,7 +7710,7 @@ ix86_expand_prologue (void) ...@@ -7710,7 +7710,7 @@ ix86_expand_prologue (void)
if (stack_realign_fp) if (stack_realign_fp)
{ {
int align_bytes = crtl->stack_alignment_needed / BITS_PER_UNIT; int align_bytes = crtl->stack_alignment_needed / BITS_PER_UNIT;
gcc_assert (align_bytes > STACK_BOUNDARY / BITS_PER_UNIT); gcc_assert (align_bytes > MIN_STACK_BOUNDARY / BITS_PER_UNIT);
/* Align the stack. */ /* Align the stack. */
insn = emit_insn ((*ix86_gen_andsp) (stack_pointer_rtx, insn = emit_insn ((*ix86_gen_andsp) (stack_pointer_rtx,
......
...@@ -651,14 +651,14 @@ enum target_cpu_default ...@@ -651,14 +651,14 @@ enum target_cpu_default
/* Stack boundary of the main function guaranteed by OS. */ /* Stack boundary of the main function guaranteed by OS. */
#define MAIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32) #define MAIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32)
/* Stack boundary guaranteed by ABI. */ /* Minimum stack boundary. */
#define ABI_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32) #define MIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 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. */
#define PREFERRED_STACK_BOUNDARY ix86_preferred_stack_boundary #define PREFERRED_STACK_BOUNDARY ix86_preferred_stack_boundary
/* It should be ABI_STACK_BOUNDARY. But we set it to 128 bits for /* It should be MIN_STACK_BOUNDARY. But we set it to 128 bits for
both 32bit and 64bit, to support codes that need 128 bit stack both 32bit and 64bit, to support codes that need 128 bit stack
alignment for SSE instructions, but can't realign the stack. */ alignment for SSE instructions, but can't realign the stack. */
#define PREFERRED_STACK_BOUNDARY_DEFAULT 128 #define PREFERRED_STACK_BOUNDARY_DEFAULT 128
......
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