Skip to content

Commit e9a2aee

Browse files
committed
Add missing cpuid check for clflushopt
1 parent 1ab64e4 commit e9a2aee

File tree

1 file changed

+2
-0
lines changed
  • compiler-rt/lib/builtins/cpu_model

1 file changed

+2
-0
lines changed

compiler-rt/lib/builtins/cpu_model/x86.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,8 @@ static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf,
958958
setFeature(FEATURE_ADX);
959959
if (HasLeaf7 && ((EBX >> 21) & 1) && HasAVX512Save)
960960
setFeature(FEATURE_AVX512IFMA);
961+
if (HasLeaf7 && ((EBX >> 23) & 1))
962+
setFeature(FEATURE_CLFLUSHOPT);
961963
if (HasLeaf7 && ((EBX >> 24) & 1))
962964
setFeature(FEATURE_CLWB);
963965
if (HasLeaf7 && ((EBX >> 28) & 1) && HasAVX512Save)

0 commit comments

Comments
 (0)