mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-10 19:34:29 +00:00
[X86] Add -mprefetchwt1/-mno-prefetchwt1 command line options and __PREFETCHWT1__ define to match gcc.
llvm-svn: 294424
This commit is contained in:
parent
204ecffdb4
commit
d2bf7b03e5
@ -2195,6 +2195,8 @@ X86
|
||||
|
||||
.. option:: -mpopcnt, -mno-popcnt
|
||||
|
||||
.. option:: -mprefetchwt1, -mno-prefetchwt1
|
||||
|
||||
.. option:: -mprfchw, -mno-prfchw
|
||||
|
||||
.. option:: -mrdrnd, -mno-rdrnd
|
||||
|
@ -1720,6 +1720,7 @@ def mno_clwb : Flag<["-"], "mno-clwb">, Group<m_x86_Features_Group>;
|
||||
def mno_movbe : Flag<["-"], "mno-movbe">, Group<m_x86_Features_Group>;
|
||||
def mno_mpx : Flag<["-"], "mno-mpx">, Group<m_x86_Features_Group>;
|
||||
def mno_sgx : Flag<["-"], "mno-sgx">, Group<m_x86_Features_Group>;
|
||||
def mno_prefetchwt1 : Flag<["-"], "mno-prefetchwt1">, Group<m_x86_Features_Group>;
|
||||
|
||||
def munaligned_access : Flag<["-"], "munaligned-access">, Group<m_arm_Features_Group>,
|
||||
HelpText<"Allow memory accesses to be unaligned (AArch32/AArch64 only)">;
|
||||
@ -1917,6 +1918,7 @@ def mclwb : Flag<["-"], "mclwb">, Group<m_x86_Features_Group>;
|
||||
def mmovbe : Flag<["-"], "mmovbe">, Group<m_x86_Features_Group>;
|
||||
def mmpx : Flag<["-"], "mmpx">, Group<m_x86_Features_Group>;
|
||||
def msgx : Flag<["-"], "msgx">, Group<m_x86_Features_Group>;
|
||||
def mprefetchwt1 : Flag<["-"], "mprefetchwt1">, Group<m_x86_Features_Group>;
|
||||
def mips16 : Flag<["-"], "mips16">, Group<m_Group>;
|
||||
def mno_mips16 : Flag<["-"], "mno-mips16">, Group<m_Group>;
|
||||
def mmicromips : Flag<["-"], "mmicromips">, Group<m_Group>;
|
||||
|
@ -3885,6 +3885,8 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
|
||||
Builder.defineMacro("__MPX__");
|
||||
if (HasSGX)
|
||||
Builder.defineMacro("__SGX__");
|
||||
if (HasPREFETCHWT1)
|
||||
Builder.defineMacro("__PREFETCHWT1__");
|
||||
|
||||
// Each case falls through to the previous one here.
|
||||
switch (SSELevel) {
|
||||
|
@ -74,3 +74,8 @@
|
||||
// RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-sgx %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-SGX %s
|
||||
// SGX: "-target-feature" "+sgx"
|
||||
// NO-SGX: "-target-feature" "-sgx"
|
||||
|
||||
// RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mprefetchwt1 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=PREFETCHWT1 %s
|
||||
// RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-prefetchwt1 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-PREFETCHWT1 %s
|
||||
// PREFETCHWT1: "-target-feature" "+prefetchwt1"
|
||||
// NO-PREFETCHWT1: "-target-feature" "-prefetchwt1"
|
||||
|
@ -731,6 +731,7 @@
|
||||
// CHECK_KNL_M32: #define __MMX__ 1
|
||||
// CHECK_KNL_M32: #define __PCLMUL__ 1
|
||||
// CHECK_KNL_M32: #define __POPCNT__ 1
|
||||
// CHECK_KNL_M32: #define __PREFETCHWT1__ 1
|
||||
// CHECK_KNL_M32: #define __RDRND__ 1
|
||||
// CHECK_KNL_M32: #define __RTM__ 1
|
||||
// CHECK_KNL_M32: #define __SSE2__ 1
|
||||
@ -766,6 +767,7 @@
|
||||
// CHECK_KNL_M64: #define __MMX__ 1
|
||||
// CHECK_KNL_M64: #define __PCLMUL__ 1
|
||||
// CHECK_KNL_M64: #define __POPCNT__ 1
|
||||
// CHECK_KNL_M64: #define __PREFETCHWT1__ 1
|
||||
// CHECK_KNL_M64: #define __RDRND__ 1
|
||||
// CHECK_KNL_M64: #define __RTM__ 1
|
||||
// CHECK_KNL_M64: #define __SSE2_MATH__ 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user