summaryrefslogtreecommitdiff
path: root/gcc/config/i386/driver-i386.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/i386/driver-i386.c')
-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 61387793d1c..1529810c78f 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -399,6 +399,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
unsigned int has_bmi = 0, has_bmi2 = 0, has_tbm = 0, has_lzcnt = 0;
unsigned int has_hle = 0, has_rtm = 0;
unsigned int has_rdrnd = 0, has_f16c = 0, has_fsgsbase = 0;
+ unsigned int has_prfchw = 0;
bool arch;
@@ -465,6 +466,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
has_avx2 = ebx & bit_AVX2;
has_bmi2 = ebx & bit_BMI2;
has_fsgsbase = ebx & bit_FSGSBASE;
+ has_prfchw = ecx & bit_PRFCHW;
}
/* Check cpuid level of extended features. */
@@ -745,11 +747,12 @@ const char *host_detect_local_cpu (int argc, const char **argv)
const char *rdrnd = has_rdrnd ? " -mrdrnd" : " -mno-rdrnd";
const char *f16c = has_f16c ? " -mf16c" : " -mno-f16c";
const char *fsgsbase = has_fsgsbase ? " -mfsgsbase" : " -mno-fsgsbase";
+ const char *prfchw = has_prfchw ? " -mprfchw" : " -mno-prfchw";
options = concat (options, cx16, sahf, movbe, ase, pclmul,
popcnt, abm, lwp, fma, fma4, xop, bmi, bmi2,
tbm, avx, avx2, sse4_2, sse4_1, lzcnt, rtm,
- hle, rdrnd, f16c, fsgsbase, NULL);
+ hle, rdrnd, f16c, fsgsbase, prfchw, NULL);
}
done: