Patchwork [x32] PATCH: Add check_effective_target_ia32

login
register
mail settings
Submitter H.J. Lu
Date March 12, 2011, 3:36 p.m.
Message ID <20110312153639.GA3986@intel.com>
Download mbox | patch
Permalink /patch/86521/
State New
Headers show

Comments

H.J. Lu - March 12, 2011, 3:36 p.m.
Hi,

We check ilp32 for ia32 tests in gcc testsuite.  It won't work with
x32.  I checked in this patch to add ia32 target.

H.J.
--
commit 9383cb747c3de3c769fa3fb2aa9c148b344399b2
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Mar 11 13:39:46 2011 -0800

    Add check_effective_target_ia32.

Patch

diff --git a/gcc/testsuite/ChangeLog.x32 b/gcc/testsuite/ChangeLog.x32
index 39ed391..788bca8 100644
--- a/gcc/testsuite/ChangeLog.x32
+++ b/gcc/testsuite/ChangeLog.x32
@@ -1,5 +1,12 @@ 
 2011-03-11  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* gcc.target/i386/stackalign/return-3.c: Require ia32 instead
+	of ilp32.
+
+	* lib/target-supports.exp (check_effective_target_ia32): New.
+
+2011-03-11  H.J. Lu  <hongjiu.lu@intel.com>
+
 	PR target/47446
 	* gcc.target/i386/pr47446-3.c: New.
 
diff --git a/gcc/testsuite/gcc.target/i386/stackalign/return-3.c b/gcc/testsuite/gcc.target/i386/stackalign/return-3.c
index dd2c2e8..e32547e 100644
--- a/gcc/testsuite/gcc.target/i386/stackalign/return-3.c
+++ b/gcc/testsuite/gcc.target/i386/stackalign/return-3.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-skip-if "" { ! { ilp32 && dfp } } { "*" } { "" } } */
+/* { dg-skip-if "" { ! { ia32 && dfp } } { "*" } { "" } } */
 /* { dg-options "-msse -std=gnu99 -mpreferred-stack-boundary=2" } */
 /* { dg-require-effective-target sse } */
 
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 2e75e5b..f46c734 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1492,6 +1492,17 @@  proc check_effective_target_ilp32 { } {
     }]
 }
 
+# Return 1 if we're generating ia32 code using default options, 0
+# otherwise.
+
+proc check_effective_target_ia32 { } {
+    return [check_no_compiler_messages ia32 object {
+	int dummy[sizeof (int) == 4
+		  && sizeof (void *) == 4
+		  && sizeof (long) == 4 ? 1 : -1] = { __i386__ };
+    }]
+}
+
 # Return 1 if we're generating x32 code using default options, 0
 # otherwise.