aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2009-12-07 22:23:16 +0000
committerSebastian Pop <spop@gcc.gnu.org>2009-12-07 22:23:16 +0000
commit8ad9d49ec9946a8ab98404ed6c07ae48e9d345ab (patch)
tree8e642be47054a446aada0679540039ee5c378538 /gcc/config
parentc3d34a7861be97f388a9e19b631b7e31fad5dcf6 (diff)
downloadgcc-8ad9d49ec9946a8ab98404ed6c07ae48e9d345ab.zip
gcc-8ad9d49ec9946a8ab98404ed6c07ae48e9d345ab.tar.gz
gcc-8ad9d49ec9946a8ab98404ed6c07ae48e9d345ab.tar.bz2
Check cpuid LWP bit.
* config/i386/driver-i386.c (host_detect_local_cpu): Add -mlwp to the options when bit_LWP is set. From-SVN: r155061
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/driver-i386.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index d3088f3..05ba01e 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, has_abm = 0;
+ unsigned int has_pclmul = 0, has_abm = 0, has_lwp = 0;
bool arch;
@@ -445,6 +445,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_lwp = ecx & bit_LWP;
has_longmode = edx & bit_LM;
has_3dnowp = edx & bit_3DNOWP;
@@ -625,6 +626,8 @@ const char *host_detect_local_cpu (int argc, const char **argv)
options = concat (options, " -mpopcnt", NULL);
if (has_abm)
options = concat (options, " -mabm", NULL);
+ if (has_lwp)
+ options = concat (options, " -mlwp", NULL);
if (has_avx)
options = concat (options, " -mavx", NULL);