aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2011-07-07 18:11:18 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2011-07-07 11:11:18 -0700
commit489319d5aa1448a8d9ce9062247c6c48f9cd745f (patch)
tree10e9d816d0ca6eedab7fbb23baeef0ff78b74cd9 /gcc
parent9b5cfeea5f2654cae1eba6988727ed15d2388da3 (diff)
downloadgcc-489319d5aa1448a8d9ce9062247c6c48f9cd745f.zip
gcc-489319d5aa1448a8d9ce9062247c6c48f9cd745f.tar.gz
gcc-489319d5aa1448a8d9ce9062247c6c48f9cd745f.tar.bz2
Add ia32 and x32 effective targets.
2011-07-07 H.J. Lu <hongjiu.lu@intel.com> * lib/target-supports.exp (check_effective_target_ia32): New. (check_effective_target_x32): Likewise. (check_effective_target_vect_cmdline_needed): Also check x32. From-SVN: r176000
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/lib/target-supports.exp25
2 files changed, 30 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0ddca2a..ff76bb0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * lib/target-supports.exp (check_effective_target_ia32): New.
+ (check_effective_target_x32): Likewise.
+ (check_effective_target_vect_cmdline_needed): Also check x32.
+
2011-07-07 Janis Johnson <janisjo@codesourcery.com>
* gcc.target/arm/pr40657-2.c: Remove -march option and unneeded
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 476a2e6..8b9c386 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1512,6 +1512,28 @@ 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.
+
+proc check_effective_target_x32 { } {
+ return [check_no_compiler_messages x32 object {
+ int dummy[sizeof (int) == 4
+ && sizeof (void *) == 4
+ && sizeof (long) == 4 ? 1 : -1] = { __x86_64__ };
+ }]
+}
+
# Return 1 if we're generating 32-bit or larger integers using default
# options, 0 otherwise.
@@ -1713,7 +1735,8 @@ proc check_effective_target_vect_cmdline_needed { } {
if { [istarget alpha*-*-*]
|| [istarget ia64-*-*]
|| (([istarget x86_64-*-*] || [istarget i?86-*-*])
- && [check_effective_target_lp64])
+ && ([check_effective_target_x32]
+ || [check_effective_target_lp64]))
|| ([istarget powerpc*-*-*]
&& ([check_effective_target_powerpc_spe]
|| [check_effective_target_powerpc_altivec]))