diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2009-12-07 22:23:10 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2009-12-07 22:23:10 +0000 |
commit | c3d34a7861be97f388a9e19b631b7e31fad5dcf6 (patch) | |
tree | 9ea029d1dfb00f981bf54d52dbefeea165fca444 | |
parent | 7fccdfcfb9e6dd397d43f00551d28b09192b363d (diff) | |
download | gcc-c3d34a7861be97f388a9e19b631b7e31fad5dcf6.zip gcc-c3d34a7861be97f388a9e19b631b7e31fad5dcf6.tar.gz gcc-c3d34a7861be97f388a9e19b631b7e31fad5dcf6.tar.bz2 |
Check cpuid ABM bit.
* config/i386/cpuid.h (bit_ABM): New.
* config/i386/driver-i386.c (host_detect_local_cpu): Add -mabm to the
options when bit_ABM is set.
From-SVN: r155060
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/cpuid.h | 5 | ||||
-rw-r--r-- | gcc/config/i386/driver-i386.c | 5 |
3 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3becda7..9f25104 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-12-07 Sebastian Pop <sebastian.pop@amd.com> + + * config/i386/cpuid.h (bit_ABM): New. + * config/i386/driver-i386.c (host_detect_local_cpu): Add -mabm to the + options when bit_ABM is set. + 2009-12-07 Jakub Jelinek <jakub@redhat.com> * config/i386/i386.c (bdesc_special_args): Move __builtin_clzs from diff --git a/gcc/config/i386/cpuid.h b/gcc/config/i386/cpuid.h index 21f0e31..3228414 100644 --- a/gcc/config/i386/cpuid.h +++ b/gcc/config/i386/cpuid.h @@ -46,11 +46,12 @@ /* Extended Features */ /* %ecx */ -#define bit_FMA4 (1 << 16) #define bit_LAHF_LM (1 << 0) -#define bit_LWP (1 << 15) +#define bit_ABM (1 << 5) #define bit_SSE4a (1 << 6) #define bit_XOP (1 << 11) +#define bit_LWP (1 << 15) +#define bit_FMA4 (1 << 16) /* %edx */ #define bit_LM (1 << 29) diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c index df0689d..d3088f3 100644 --- a/gcc/config/i386/driver-i386.c +++ b/gcc/config/i386/driver-i386.c @@ -383,7 +383,7 @@ const char *host_detect_local_cpu (int argc, const char **argv) unsigned int has_longmode = 0, has_3dnowp = 0, has_3dnow = 0; unsigned int has_movbe = 0, has_sse4_1 = 0, has_sse4_2 = 0; unsigned int has_popcnt = 0, has_aes = 0, has_avx = 0; - unsigned int has_pclmul = 0; + unsigned int has_pclmul = 0, has_abm = 0; bool arch; @@ -444,6 +444,7 @@ const char *host_detect_local_cpu (int argc, const char **argv) has_lahf_lm = ecx & bit_LAHF_LM; has_sse4a = ecx & bit_SSE4a; + has_abm = ecx & bit_ABM; has_longmode = edx & bit_LM; has_3dnowp = edx & bit_3DNOWP; @@ -622,6 +623,8 @@ const char *host_detect_local_cpu (int argc, const char **argv) options = concat (options, " -mpclmul", NULL); if (has_popcnt) options = concat (options, " -mpopcnt", NULL); + if (has_abm) + options = concat (options, " -mabm", NULL); if (has_avx) options = concat (options, " -mavx", NULL); |