aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2011-07-10 19:25:28 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2011-07-10 12:25:28 -0700
commita1f91bca13c252376afb41e1fd14fe684beac5f1 (patch)
treef6fc2aab448c8fc4961e91f266121639e3069cbb /gcc/config
parent89560a3c2c5046489930c3532e128fdc2f77e24e (diff)
downloadgcc-a1f91bca13c252376afb41e1fd14fe684beac5f1.zip
gcc-a1f91bca13c252376afb41e1fd14fe684beac5f1.tar.gz
gcc-a1f91bca13c252376afb41e1fd14fe684beac5f1.tar.bz2
Turn on 64bit and check models for x32.
2011-07-10 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. From-SVN: r176127
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 04cb07d..f3fd0db 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: