From e997151e8ee36309c47d716997ced5784584aeef Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 8 Feb 2017 07:13:19 +0000 Subject: [PATCH] [X86] Add -mmovbe/-mno-movbe command line options to match gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294413 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/Options.td | 2 ++ test/Driver/x86-target-features.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 83d7beaee8..76b8d0de29 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1716,6 +1716,7 @@ def mno_xsaves : Flag<["-"], "mno-xsaves">, Group; def mno_mwaitx : Flag<["-"], "mno-mwaitx">, Group; def mno_pku : Flag<["-"], "mno-pku">, Group; def mno_clflushopt : Flag<["-"], "mno-clflushopt">, Group; +def mno_movbe : Flag<["-"], "mno-movbe">, Group; def munaligned_access : Flag<["-"], "munaligned-access">, Group, HelpText<"Allow memory accesses to be unaligned (AArch32/AArch64 only)">; @@ -1909,6 +1910,7 @@ def mxsavec : Flag<["-"], "mxsavec">, Group; def mxsaves : Flag<["-"], "mxsaves">, Group; def mmwaitx : Flag<["-"], "mmwaitx">, Group; def mclflushopt : Flag<["-"], "mclflushopt">, Group; +def mmovbe : Flag<["-"], "mmovbe">, Group; def mips16 : Flag<["-"], "mips16">, Group; def mno_mips16 : Flag<["-"], "mno-mips16">, Group; def mmicromips : Flag<["-"], "mmicromips">, Group; diff --git a/test/Driver/x86-target-features.c b/test/Driver/x86-target-features.c index c254efe57a..6ead9a2d2d 100644 --- a/test/Driver/x86-target-features.c +++ b/test/Driver/x86-target-features.c @@ -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" -- 2.40.0