Commit a1f91bca by H.J. Lu Committed by H.J. Lu

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
parent 89560a3c
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.
2011-07-10 Hans-Peter Nilsson <hp@axis.com> 2011-07-10 Hans-Peter Nilsson <hp@axis.com>
PR target/49684 PR target/49684
......
...@@ -2973,6 +2973,9 @@ ix86_option_override_internal (bool main_args_p) ...@@ -2973,6 +2973,9 @@ ix86_option_override_internal (bool main_args_p)
SUBSUBTARGET_OVERRIDE_OPTIONS; SUBSUBTARGET_OVERRIDE_OPTIONS;
#endif #endif
if (TARGET_X32)
ix86_isa_flags |= OPTION_MASK_ISA_64BIT;
/* -fPIC is the default for x86_64. */ /* -fPIC is the default for x86_64. */
if (TARGET_MACHO && TARGET_64BIT) if (TARGET_MACHO && TARGET_64BIT)
flag_pic = 2; flag_pic = 2;
...@@ -3064,6 +3067,9 @@ ix86_option_override_internal (bool main_args_p) ...@@ -3064,6 +3067,9 @@ ix86_option_override_internal (bool main_args_p)
if (!TARGET_64BIT) if (!TARGET_64BIT)
error ("code model %qs not supported in the %s bit mode", error ("code model %qs not supported in the %s bit mode",
"medium", "32"); "medium", "32");
else if (TARGET_X32)
error ("code model %qs not supported in x32 mode",
"medium");
break; break;
case CM_LARGE: case CM_LARGE:
...@@ -3073,6 +3079,9 @@ ix86_option_override_internal (bool main_args_p) ...@@ -3073,6 +3079,9 @@ ix86_option_override_internal (bool main_args_p)
if (!TARGET_64BIT) if (!TARGET_64BIT)
error ("code model %qs not supported in the %s bit mode", error ("code model %qs not supported in the %s bit mode",
"large", "32"); "large", "32");
else if (TARGET_X32)
error ("code model %qs not supported in x32 mode",
"medium");
break; break;
case CM_32: case CM_32:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment