[cfe-dev] [PATCH] Correct bit_SSE4* macro names to match gcc.

Chandler Carruth chandlerc at google.com
Thu May 22 20:24:26 PDT 2014


We need a test case for this patch at the least.

I also wonder if we shouldn't support both names to avoid breaking any code
that has been written to Clang and never tested with GCC? Supporting both
names in this particular context seems less onerous than usual.


On Thu, May 22, 2014 at 9:22 PM, Matt Turner <mattst88 at gmail.com> wrote:

> These have been incorrect since they were added to clang, and wouldn't
> have been useful to programs without additional workarounds.
> ---
> I added CPU feature detection via cpuid.h to Mesa, and discovered
> that clang's macro names for SSE4.* were broken.
>
> Please Cc me on replies, and please commit, I don't have access.
>
>  lib/Headers/cpuid.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/Headers/cpuid.h b/lib/Headers/cpuid.h
> index f9254e9..ae78e19 100644
> --- a/lib/Headers/cpuid.h
> +++ b/lib/Headers/cpuid.h
> @@ -43,8 +43,8 @@
>  #define bit_PDCM        0x00008000
>  #define bit_PCID        0x00020000
>  #define bit_DCA         0x00040000
> -#define bit_SSE41       0x00080000
> -#define bit_SSE42       0x00100000
> +#define bit_SSE4_1      0x00080000
> +#define bit_SSE4_2      0x00100000
>  #define bit_x2APIC      0x00200000
>  #define bit_MOVBE       0x00400000
>  #define bit_POPCNT      0x00800000
> --
> 1.8.3.2
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140522/029d1dad/attachment.html>


More information about the cfe-dev mailing list