From: "H.J. Lu" <hongjiu.lu@intel.com>
To: gcc-patches@gcc.gnu.org, Uros Bizjak <ubizjak@gmail.com>
Subject: PATCH [2/n] X32: Turn on 64bit and check models for x32
Date: Sat, 09 Jul 2011 21:28:00 -0000 [thread overview]
Message-ID: <20110709212239.GA3503@intel.com> (raw)
Hi,
This patch turns on 64bit and check models for x32. OK for trunk?
Thanks.
H.J.
---
2011-07-09 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (ix86_option_override_internal): Turn on
OPTION_MASK_ISA_64BIT for TARGET_X32. Only allow small and
small PIC models for TARGET_X32.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 04cb07d..c852719 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2973,6 +2973,9 @@ ix86_option_override_internal (bool main_args_p)
SUBSUBTARGET_OVERRIDE_OPTIONS;
#endif
+ if (TARGET_X32)
+ ix86_isa_flags |= OPTION_MASK_ISA_64BIT;
+
/* -fPIC is the default for x86_64. */
if (TARGET_MACHO && TARGET_64BIT)
flag_pic = 2;
@@ -3064,6 +3067,9 @@ ix86_option_override_internal (bool main_args_p)
if (!TARGET_64BIT)
error ("code model %qs not supported in the %s bit mode",
"medium", "32");
+ else if (TARGET_X32)
+ error ("code model %qs not supported in x32 mode",
+ "medium");
break;
case CM_LARGE:
@@ -3073,6 +3079,9 @@ ix86_option_override_internal (bool main_args_p)
if (!TARGET_64BIT)
error ("code model %qs not supported in the %s bit mode",
"large", "32");
+ else if (TARGET_X32)
+ error ("code model %qs not supported in x32 mode",
+ "medium");
break;
case CM_32:
next reply other threads:[~2011-07-09 21:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-09 21:28 H.J. Lu [this message]
2011-07-10 14:33 ` Uros Bizjak
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=20110709212239.GA3503@intel.com \
--to=hongjiu.lu@intel.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--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).