aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl@gcc.gnu.org>2010-09-07 14:18:55 -0700
committerH.J. Lu <hjl@gcc.gnu.org>2010-09-07 14:18:55 -0700
commita0766cdbb98bcbfb85f977930d3cead1f02f292a (patch)
tree939c175cf18e0a6b7d5c9ac3f3e29920113c79a5
parent4e75177267c0e5f3e6098ea388953bd6d9a4cef6 (diff)
downloadgcc-a0766cdbb98bcbfb85f977930d3cead1f02f292a.zip
gcc-a0766cdbb98bcbfb85f977930d3cead1f02f292a.tar.gz
gcc-a0766cdbb98bcbfb85f977930d3cead1f02f292a.tar.bz2
Redefine STACK_BOUNDARY/PREFERRED_STACK_BOUNDARY for Darwin/x86.
gcc/ 2010-09-07 H.J. Lu <hjl.tools@gmail.com> Jack Howarth <howarth@bromo.med.uc.edu> PR target/36502 PR target/42313 PR target/44651 * gcc/config/i386/darwin.h (STACK_BOUNDARY): Redefine as 128 for profiling or 64-bit MS_ABI and as BITS_PER_WORD otherwise. (PREFERRED_STACK_BOUNDARY): Replace STACK_BOUNDARY with 128 in MAX macro. gcc/testsuite/ 2010-09-07 Jack Howarth <howarth@bromo.med.uc.edu> PR target/36502 * gcc.target/i386/pr36502.c: New test. PR target/42313 PR target/44651 * gcc.target/i386/builtin-unreachable.c: Don't skip on darwin. * gcc/testsuite/gcc.dg/stack-usage-1.c: Use default on i386/Darwin. From-SVN: r163971
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/i386/darwin.h6
-rw-r--r--gcc/testsuite/ChangeLog10
-rw-r--r--gcc/testsuite/gcc.dg/stack-usage-1.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/builtin-unreachable.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr36502.c7
6 files changed, 34 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9acad65..33c56d9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-07 H.J. Lu <hjl.tools@gmail.com>
+ Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR target/36502
+ PR target/42313
+ PR target/44651
+ * gcc/config/i386/darwin.h (STACK_BOUNDARY): Redefine as 128 for
+ profiling or 64-bit MS_ABI and as BITS_PER_WORD otherwise.
+ (PREFERRED_STACK_BOUNDARY): Replace STACK_BOUNDARY with 128 in
+ MAX macro.
+
2010-09-07 H.J. Lu <hongjiu.lu@intel.com>
* unwind-dw2-fde-glibc.c: Include <elf.h> for DT_CONFIG.
diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h
index cd3158c..416b023 100644
--- a/gcc/config/i386/darwin.h
+++ b/gcc/config/i386/darwin.h
@@ -79,7 +79,9 @@ extern int darwin_emit_branch_islands;
Failure to ensure this will lead to a crash in the system libraries
or dynamic loader. */
#undef STACK_BOUNDARY
-#define STACK_BOUNDARY 128
+#define STACK_BOUNDARY \
+ ((profile_flag || (TARGET_64BIT && ix86_abi == MS_ABI)) \
+ ? 128 : BITS_PER_WORD)
#undef MAIN_STACK_BOUNDARY
#define MAIN_STACK_BOUNDARY 128
@@ -91,7 +93,7 @@ extern int darwin_emit_branch_islands;
it's below the minimum. */
#undef PREFERRED_STACK_BOUNDARY
#define PREFERRED_STACK_BOUNDARY \
- MAX (STACK_BOUNDARY, ix86_preferred_stack_boundary)
+ MAX (128, ix86_preferred_stack_boundary)
/* We want -fPIC by default, unless we're using -static to compile for
the kernel or some such. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 289b6b8..0c29f20 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-07 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR target/36502
+ * gcc.target/i386/pr36502.c: New test.
+
+ PR target/42313
+ PR target/44651
+ * gcc.target/i386/builtin-unreachable.c: Don't skip on darwin.
+ * gcc/testsuite/gcc.dg/stack-usage-1.c: Use default on i386/Darwin.
+
2010-09-07 Mikael Morin <mikael@gcc.gnu.org>
* gfortran.dg/achar_4.f90: Enable bounds checking.
diff --git a/gcc/testsuite/gcc.dg/stack-usage-1.c b/gcc/testsuite/gcc.dg/stack-usage-1.c
index 48fc9ee..f174882 100644
--- a/gcc/testsuite/gcc.dg/stack-usage-1.c
+++ b/gcc/testsuite/gcc.dg/stack-usage-1.c
@@ -8,11 +8,7 @@
Then check that this is the actual stack usage in the assembly file. */
#if defined(__i386__)
-# if defined (__MACH__)
-# define SIZE 232
-# else
-# define SIZE 248
-# endif
+# define SIZE 248
#elif defined(__x86_64__)
# define SIZE 356
#elif defined (__sparc__)
diff --git a/gcc/testsuite/gcc.target/i386/builtin-unreachable.c b/gcc/testsuite/gcc.target/i386/builtin-unreachable.c
index 85e81f0..802cf16 100644
--- a/gcc/testsuite/gcc.target/i386/builtin-unreachable.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-unreachable.c
@@ -9,5 +9,5 @@ int h (char *p)
__builtin_unreachable ();
return p ? 1 : 0;
}
-/* { dg-final { scan-assembler-not "%e\[bs\]p" { target { ! *-*-darwin* } } } } */
+/* { dg-final { scan-assembler-not "%e\[bs\]p" } } */
/* { dg-final { scan-assembler-not "\[\\t \]+j" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr36502.c b/gcc/testsuite/gcc.target/i386/pr36502.c
new file mode 100644
index 0000000..5794159
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr36502.c
@@ -0,0 +1,7 @@
+/* PR target/36502 */
+/* { dg-do compile { target { *-*-darwin* && ilp32 } } } */
+/* { dg-options "-O -fomit-frame-pointer -fno-pic -S" } */
+int a;
+void f() {a++;}
+/* { dg-final { scan-assembler-not "esp" } } */
+