This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [stack] Automatic Stack Aligment Support
Hi,
For testing, we enabled c, c++, fortran, ada, java, objc, obj-c++. We also
made the change enclosed here. That is on Linux/ia32, for each function,
we assume incoming stack is aligned at 4 byte and outgoing stack will be
aligned at 16byte. We stressed our stack alignment implementation
with "make check". The only expected failures are:
FAIL: gcc.target/i386/andor-1.c scan-assembler-not andl
FAIL: gcc.target/i386/stackalign/asm-1.c -mstackrealign (internal
compiler error)
FAIL: gcc.target/i386/stackalign/asm-1.c -mstackrealign (test for excess errors)
FAIL: gcc.target/i386/stackalign/asm-1.c -mno-stackrealign (internal
compiler error)
FAIL: gcc.target/i386/stackalign/asm-1.c -mno-stackrealign (test for
excess errors)
FAIL: gcc.target/i386/stackalign/local-1.c -mno-stackrealign
scan-assembler-not sub[^\\n]*sp
H.J.
---
--- gcc-stack-fsf/gcc/gcc/config/i386/i386.h 2008-03-20 10:06:33.000000000 -0
700
+++ gcc-stack-frame/gcc/gcc/config/i386/i386.h 2008-03-19 10:58:17.000000000 -0
700
@@ -824,6 +824,18 @@ enum target_cpu_default
128, stacks for all functions may be realigned. */
#define STACK_REALIGN_DEFAULT 0
+/* The followings should be removed when we merge the stack alignment
+ branch to mainline. */
+#undef PREFERRED_STACK_BOUNDARY_DEFAULT
+#undef STACK_REALIGN_DEFAULT
+#if 0
+#define PREFERRED_STACK_BOUNDARY_DEFAULT ABI_STACK_BOUNDARY
+#define STACK_REALIGN_DEFAULT 0
+#else
+#define PREFERRED_STACK_BOUNDARY_DEFAULT 128
+#define STACK_REALIGN_DEFAULT (TARGET_64BIT ? 0 : 1)
+#endif
+
/* Boundary (in *bits*) on which the incoming stack is aligned. */
#define INCOMING_STACK_BOUNDARY ix86_incoming_stack_boundary
when we were testing
On Thu, Mar 20, 2008 at 7:00 AM, Ye, Joey <joey.ye@intel.com> wrote:
> Test on Linux/ia32 and Linux/Intel64 with trunk revision 133266 is done.
> Following known failures are expected:
> FAIL: gcc.c-torture/compile/920520-1.c -O0 (internal compiler error)
> FAIL: gcc.c-torture/compile/920520-1.c -O0 (test for excess errors)
> FAIL: gcc.target/i386/stackalign/asm-1.c -mstackrealign (internal
> compiler error)
> FAIL: gcc.target/i386/stackalign/asm-1.c -mstackrealign (test for excess
> errors)
> FAIL: gcc.target/i386/stackalign/asm-1.c -mno-stackrealign (internal
> compiler error)
> FAIL: gcc.target/i386/stackalign/asm-1.c -mno-stackrealign (test for
> excess errors)
> FAIL: gcc.target/i386/stackalign/local-1.c -mno-stackrealign
> scan-assembler-not sub[^\\n]*sp
>
> Thanks - Joey
>
>
>
> -----Original Message-----
> From: Ye, Joey
> Sent: Thursday, March 20, 2008 8:51 PM
> To: Ye, Joey; gcc-patches@gcc.gnu.org
> Cc: Guo, Xuepeng; Lu, Hongjiu
> Subject: RE: [stack] Automatic Stack Aligment Support
>
> Updated patch:
>
> 2008-03-19 Joey Ye <joey.ye@intel.com>
> H.J. Lu <hongjiu.lu@intel.com>
> Xuepeng Guo <xuepeng.guo@intel.com>
>
> * builtins.c (expand_builtin_setjmp_receiver): Replace
> virtual_incoming_args_rtx with
> current_function_internal_arg_pointer.
> (expand_builtin_apply_args_1): Likewise.
>