From: Hal Finkel Date: Fri, 28 Feb 2014 00:27:57 +0000 (+0000) Subject: Add -mcrbits/-mno-crbits to control the PowerPC CR-bit-tracking feature X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c2606cec7430e92bbac68e6427f2d83104037515;p=clang Add -mcrbits/-mno-crbits to control the PowerPC CR-bit-tracking feature The backend currently enables CR-bit tracking by default at -O2 and higher. These flags allow the user to override that default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202453 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 019850be3d..6b7bfe77f1 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1090,6 +1090,8 @@ def mpopcntd : Flag<["-"], "mpopcntd">, Group; def mno_popcntd : Flag<["-"], "mno-popcntd">, Group; def mqpx : Flag<["-"], "mqpx">, Group; def mno_qpx : Flag<["-"], "mno-qpx">, Group; +def mcrbits : Flag<["-"], "mcrbits">, Group; +def mno_crbits : Flag<["-"], "mno-crbits">, Group; def faltivec : Flag<["-"], "faltivec">, Group, Flags<[CC1Option]>, HelpText<"Enable AltiVec vector initializer syntax">; diff --git a/test/Driver/ppc-features.cpp b/test/Driver/ppc-features.cpp index 6959c629e5..ab4bb365a1 100644 --- a/test/Driver/ppc-features.cpp +++ b/test/Driver/ppc-features.cpp @@ -92,3 +92,9 @@ // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-vsx -mvsx -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-VSX %s // CHECK-VSX: "-target-feature" "+vsx" +// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-crbits -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s +// CHECK-NOCRBITS: "-target-feature" "-crbits" + +// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-crbits -mcrbits -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s +// CHECK-CRBITS: "-target-feature" "+crbits" +