This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Define HAS_CPUID/HAS_I586/HAS_I686 from -march=
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 18 Aug 2015 07:56:47 -0700
- Subject: Re: [PATCH] Define HAS_CPUID/HAS_I586/HAS_I686 from -march=
- Authentication-results: sourceware.org; auth=none
- References: <20150817231005 dot GA24205 at intel dot com> <20150818143258 dot GM1584 at vapier>
On Tue, Aug 18, 2015 at 7:32 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On 17 Aug 2015 16:10, H.J. Lu wrote:
>> +#ifdef __x86_64__
>> +# define HAS_CPUID 1
>> +#elif defined __pentium__
>> +# define HAS_CPUID 1
>> +# define HAS_I586 1
>> +# define HAS_I686 0
>> +#elif (defined __pentiumpro__ || defined __pentium4__ \
>> + || defined __nocona__ || defined __atom__ \
>> + || defined __core2__ || defined __corei7__ \
>> + || defined __corei7_avx__ || defined __core_avx2__ \
>> + || defined __nehalem__ || defined __sandybridge__ \
>> + || defined __haswell__ || defined __knl__ \
>> + || defined __bonnell__ || defined __silvermont__ \
>> + || defined __k6__ || defined __k8__ \
>> + || defined __athlon__ || defined __amdfam10__ \
>> + || defined __bdver1__ || defined __bdver2__ \
>> + || defined __bdver3__ || defined __bdver4__ \
>> + || defined __btver1__ || defined __btver2__)
>> +# define HAS_CPUID 1
>> +# define HAS_I586 1
>> +# define HAS_I686 1
>> +#else
>> +# define HAS_CPUID 0
>> +# define HAS_I586 0
>> +# define HAS_I686 0
>> +#endif
>
> why is testing for __i686__ & __i586__ unacceptable ?
> -mike
-march=haswell doesn't define __i686__ since __i686__ is
mapped to -mach=i686.
--
H.J.