[clang] a8ccb48 - [X86] Add 'fxsr' feature to -march=pentium2 to match X86.td and gcc.
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 6 10:30:10 PST 2019
Author: Craig Topper
Date: 2019-11-06T10:27:53-08:00
New Revision: a8ccb48f697d3fbe85c593248ff1053fdf522a6e
URL: https://github.com/llvm/llvm-project/commit/a8ccb48f697d3fbe85c593248ff1053fdf522a6e
DIFF: https://github.com/llvm/llvm-project/commit/a8ccb48f697d3fbe85c593248ff1053fdf522a6e.diff
LOG: [X86] Add 'fxsr' feature to -march=pentium2 to match X86.td and gcc.
Added:
Modified:
clang/lib/Basic/Targets/X86.cpp
clang/test/Preprocessor/predefined-arch-macros.c
Removed:
################################################################################
diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index 9ccc6d7945e9..51f2006ddbdc 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -246,10 +246,11 @@ bool X86TargetInfo::initFeatureMap(
case CK_Pentium3:
case CK_C3_2:
setFeatureEnabledImpl(Features, "sse", true);
+ LLVM_FALLTHROUGH;
+ case CK_Pentium2:
setFeatureEnabledImpl(Features, "fxsr", true);
LLVM_FALLTHROUGH;
case CK_PentiumMMX:
- case CK_Pentium2:
case CK_K6:
case CK_WinChipC6:
setFeatureEnabledImpl(Features, "mmx", true);
diff --git a/clang/test/Preprocessor/predefined-arch-macros.c b/clang/test/Preprocessor/predefined-arch-macros.c
index 95bea654fe22..ab36e98beb71 100644
--- a/clang/test/Preprocessor/predefined-arch-macros.c
+++ b/clang/test/Preprocessor/predefined-arch-macros.c
@@ -184,6 +184,7 @@
// RUN: %clang -march=pentium2 -m32 -E -dM %s -o - 2>&1 \
// RUN: -target i386-unknown-linux \
// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM2_M32
+// CHECK_PENTIUM2_M32: #define __FXSR__ 1
// CHECK_PENTIUM2_M32: #define __MMX__ 1
// CHECK_PENTIUM2_M32: #define __i386 1
// CHECK_PENTIUM2_M32: #define __i386__ 1
More information about the cfe-commits
mailing list