cpuinfo: Make CPU flags easier to read and add to.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 14 May 2018 00:03:39 -0400
changeset 1198536aa0bf7312b
parent 11984 987c5dc71309
child 11986 e307b74aa643
cpuinfo: Make CPU flags easier to read and add to.
src/cpuinfo/SDL_cpuinfo.c
     1.1 --- a/src/cpuinfo/SDL_cpuinfo.c	Mon May 21 11:34:57 2018 -0400
     1.2 +++ b/src/cpuinfo/SDL_cpuinfo.c	Mon May 14 00:03:39 2018 -0400
     1.3 @@ -77,18 +77,18 @@
     1.4  #endif
     1.5  #endif
     1.6  
     1.7 -#define CPU_HAS_RDTSC   0x00000001
     1.8 -#define CPU_HAS_ALTIVEC 0x00000002
     1.9 -#define CPU_HAS_MMX     0x00000004
    1.10 -#define CPU_HAS_3DNOW   0x00000008
    1.11 -#define CPU_HAS_SSE     0x00000010
    1.12 -#define CPU_HAS_SSE2    0x00000020
    1.13 -#define CPU_HAS_SSE3    0x00000040
    1.14 -#define CPU_HAS_SSE41   0x00000100
    1.15 -#define CPU_HAS_SSE42   0x00000200
    1.16 -#define CPU_HAS_AVX     0x00000400
    1.17 -#define CPU_HAS_AVX2    0x00000800
    1.18 -#define CPU_HAS_NEON    0x00001000
    1.19 +#define CPU_HAS_RDTSC   (1 << 0)
    1.20 +#define CPU_HAS_ALTIVEC (1 << 1)
    1.21 +#define CPU_HAS_MMX     (1 << 2)
    1.22 +#define CPU_HAS_3DNOW   (1 << 3)
    1.23 +#define CPU_HAS_SSE     (1 << 4)
    1.24 +#define CPU_HAS_SSE2    (1 << 5)
    1.25 +#define CPU_HAS_SSE3    (1 << 6)
    1.26 +#define CPU_HAS_SSE41   (1 << 7)
    1.27 +#define CPU_HAS_SSE42   (1 << 8)
    1.28 +#define CPU_HAS_AVX     (1 << 9)
    1.29 +#define CPU_HAS_AVX2    (1 << 10)
    1.30 +#define CPU_HAS_NEON    (1 << 11)
    1.31  
    1.32  #if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP && !__MACOSX__ && !__OpenBSD__
    1.33  /* This is the brute force way of detecting instruction sets...