]> granicus.if.org Git - clang/commitdiff
[X86] Add -mmovbe/-mno-movbe command line options to match gcc.
authorCraig Topper <craig.topper@gmail.com>
Wed, 8 Feb 2017 07:13:19 +0000 (07:13 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 8 Feb 2017 07:13:19 +0000 (07:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294413 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td
test/Driver/x86-target-features.c

index 83d7beaee8c1b820ec6ed9614e5365b021625454..76b8d0de292eba9834c5e98e93c0cd51d6a7cc3d 100644 (file)
@@ -1716,6 +1716,7 @@ def mno_xsaves : Flag<["-"], "mno-xsaves">, Group<m_x86_Features_Group>;
 def mno_mwaitx : Flag<["-"], "mno-mwaitx">, Group<m_x86_Features_Group>;
 def mno_pku : Flag<["-"], "mno-pku">, Group<m_x86_Features_Group>;
 def mno_clflushopt : Flag<["-"], "mno-clflushopt">, Group<m_x86_Features_Group>;
+def mno_movbe : Flag<["-"], "mno-movbe">, 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)">;
@@ -1909,6 +1910,7 @@ def mxsavec : Flag<["-"], "mxsavec">, Group<m_x86_Features_Group>;
 def mxsaves : Flag<["-"], "mxsaves">, Group<m_x86_Features_Group>;
 def mmwaitx : Flag<["-"], "mmwaitx">, Group<m_x86_Features_Group>;
 def mclflushopt : Flag<["-"], "mclflushopt">, Group<m_x86_Features_Group>;
+def mmovbe : Flag<["-"], "mmovbe">, 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>;
index c254efe57a764eff8f58642080064f827c334eb7..6ead9a2d2de9d1f98536baef9d37cc3b76ffbbbd 100644 (file)
@@ -54,3 +54,8 @@
 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-clflushopt %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-CLFLUSHOPT %s
 // CLFLUSHOPT: "-target-feature" "+clflushopt"
 // NO-CLFLUSHOPT: "-target-feature" "-clflushopt"
+
+// RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mmovbe %s -### -o %t.o 2>&1 | FileCheck -check-prefix=MOVBE %s
+// RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-movbe %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-MOVBE %s
+// MOVBE: "-target-feature" "+movbe"
+// NO-MOVBE: "-target-feature" "-movbe"