Skip to content

Commit a8ccb48

Browse files
committed
[X86] Add 'fxsr' feature to -march=pentium2 to match X86.td and gcc.
1 parent ba73aad commit a8ccb48

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clang/lib/Basic/Targets/X86.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,11 @@ bool X86TargetInfo::initFeatureMap(
246246
case CK_Pentium3:
247247
case CK_C3_2:
248248
setFeatureEnabledImpl(Features, "sse", true);
249+
LLVM_FALLTHROUGH;
250+
case CK_Pentium2:
249251
setFeatureEnabledImpl(Features, "fxsr", true);
250252
LLVM_FALLTHROUGH;
251253
case CK_PentiumMMX:
252-
case CK_Pentium2:
253254
case CK_K6:
254255
case CK_WinChipC6:
255256
setFeatureEnabledImpl(Features, "mmx", true);

clang/test/Preprocessor/predefined-arch-macros.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@
184184
// RUN: %clang -march=pentium2 -m32 -E -dM %s -o - 2>&1 \
185185
// RUN: -target i386-unknown-linux \
186186
// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM2_M32
187+
// CHECK_PENTIUM2_M32: #define __FXSR__ 1
187188
// CHECK_PENTIUM2_M32: #define __MMX__ 1
188189
// CHECK_PENTIUM2_M32: #define __i386 1
189190
// CHECK_PENTIUM2_M32: #define __i386__ 1

0 commit comments

Comments
 (0)