From: "H.J. Lu" <hongjiu.lu@intel.com>
To: gcc-patches@gcc.gnu.org
Cc: Uros Bizjak <ubizjak@gmail.com>,
ro@CeBiTec.Uni-Bielefeld.DE, mikestump@comcast.net
Subject: PATCH: Support -mx32 in GCC tests
Date: Thu, 07 Jul 2011 17:38:00 -0000 [thread overview]
Message-ID: <20110707172953.GA6453@intel.com> (raw)
Hi,
On Linux/x86-64, when we pass
RUNTESTFLAGS="--target_board='unix{-mx32}'"
to GCC tests, we can't check lp64/ilp32 for availability of 64bit x86
instructions. This patch adds ia32 and x32 effetive targets. OK for
trunk?
Thanks.
H.J.
---
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.
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 7db156f..b5b8782 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]))
next reply other threads:[~2011-07-07 17:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-07 17:38 H.J. Lu [this message]
2011-07-07 18:07 ` Mike Stump
2011-07-07 18:33 ` H.J. Lu
2011-07-07 20:33 ` Mike Stump
2011-07-07 20:58 ` H.J. Lu
2011-07-07 21:12 ` H.J. Lu
2011-07-07 21:32 ` H.J. Lu
2011-07-07 22:20 ` Mike Stump
2011-07-07 22:26 ` H.J. Lu
2011-07-07 23:04 ` Mike Stump
2011-07-08 0:17 ` H.J. Lu
2011-07-08 9:21 ` Uros Bizjak
2011-07-10 9:34 ` PATCH: Check ia32 " H.J. Lu
2011-07-10 10:02 ` H.J. Lu
2011-07-11 7:49 ` Mike Stump
2011-07-11 7:48 ` Mike Stump
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110707172953.GA6453@intel.com \
--to=hongjiu.lu@intel.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=mikestump@comcast.net \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).