This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Add OPTION_MASK_ISA_X86_64 and support TARGET_BI_ARCH == 2
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 28 Mar 2012 12:17:17 +0200
- Subject: Re: PATCH: Add OPTION_MASK_ISA_X86_64 and support TARGET_BI_ARCH == 2
- References: <20120324224229.GA8465@intel.com> <20120327174852.GA9980@intel.com>
On Tue, Mar 27, 2012 at 7:48 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>> OPTION_MASK_ISA_64BIT ? ? ? ? ? ? ? ? 32bit x86-64 code or 64bit x86-64 code
>> OPTION_MASK_ISA_X86_64 ? ? ? ? ? ? ? ?64bit x86-64 code
>> OPTION_MASK_ISA_X32 ? ? ? ? ? 32bit x86-64 code
How annoying, the first one doesn't mean what it says.
OPTION_MASK_ISA_64BIT should be renamed to OPTION_MASK_ARCH_X86_64,
then it makes sense. For consistency, I'd say:
OPTION_MASK_ISA_64BIT -> OPTION_MASK_ARCH_X86_64
OPTION_MASK_ISA_X86_64 -> OPTION_MASK_ISA_64
OPTION_MASK_ISA_X32 -> stays the same.
>> and i386.opt becomes
>>
>> -m64: Turn on OPTION_MASK_ISA_X86_64
>> -mx32: Turn on OPTION_MASK_ISA_X32
>> -m32: Turn off OPTION_MASK_ISA_64BIT
>>
>> Both OPTION_MASK_ISA_X32 and OPTION_MASK_ISA_X86_64 imply
>> OPTION_MASK_ISA_64BIT. OPTION_MASK_ISA_X32 clears OPTION_MASK_ISA_X86_64
>> and vice versa.
With a renamed macros, the above make sense.
> -#define TARGET_LP64 ? ?(TARGET_64BIT && !TARGET_X32)
> +#define TARGET_LP64 ? ?TARGET_X86_64
You don't need new define, just use OPTION_MASK_ISA_64.
Uros.