This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Darwin problem (Re: PATCH: Select the default x86 arch/cpu based on target)


On Thu, Feb 25, 2010 at 6:56 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Feb 25, 2010 at 6:34 PM, Jason Merrill <jason@redhat.com> wrote:
>> OK.
>>
>
> I checked in. But I am afraid it may break Darwin due to
>
> 1. in i386/darwin.h, there are
>
> /* For darwin we want to target specific processor features as a minimum,
> ? but these unfortunately don't correspond to a specific processor. ?*/
> #undef TARGET_SUBTARGET32_ISA_DEFAULT
> #define TARGET_SUBTARGET32_ISA_DEFAULT (OPTION_MASK_ISA_MMX ? ? ? ? ? ? \
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| OPTION_MASK_ISA_SSE ? ? ? ? ? \
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| OPTION_MASK_ISA_SSE2)
>
> 2. In i386.c,
>
> ? ? target_flags |= TARGET_SUBTARGET32_DEFAULT & ~target_flags_explicit;
>
> ? ? ?if (!ix86_arch_specified)
> ? ? ?ix86_isa_flags
> ? ? ? ?|= TARGET_SUBTARGET32_ISA_DEFAULT & ~ix86_isa_flags_explicit;
>
> Since we nor provide default arch, TARGET_SUBTARGET32_DEFAULT may not
> be used at all.
>

Here is a patch. It adds "default_" to default arch, sets ix86_arch_string
to "XXX" and ix86_arch_specified to 0 for -march=default_XXX. OK to
install?

Thanks.


-- 
H.J.
---
2010-02-25  H.J. Lu  <hongjiu.lu@intel.com>

	* config.gcc: Set add "default_" to default arch for
	i[34567]86-*-*|x86_64-*-* targets.

	* config/i386/i386.c (override_options): Set ix86_arch_string
	to "XXX" and ix86_arch_specified to 0 for -march=default_XXX.

Attachment: gcc-arch-default-1.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]