From: Hal Finkel Date: Tue, 6 Jan 2015 23:06:41 +0000 (+0000) Subject: [PowerPC] Add support for -mcmpb X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31d9c8d0e44b388babaf66caaa9734179fdaca32;p=clang [PowerPC] Add support for -mcmpb In r225106, support for the CMPB instruction was added to the PowerPC backend. This adds the associated GCC-compatible feature flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225312 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 4cc3f64dde..c6517d15da 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1204,6 +1204,8 @@ def mno_power8_vector : Flag<["-"], "mno-power8-vector">, Group; def mfprnd : Flag<["-"], "mfprnd">, Group; def mno_fprnd : Flag<["-"], "mno-fprnd">, Group; +def mcmpb : Flag<["-"], "mcmpb">, Group; +def mno_cmpb : Flag<["-"], "mno-cmpb">, Group; def mmfcrf : Flag<["-"], "mmfcrf">, Group; def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Group; def mpopcntd : Flag<["-"], "mpopcntd">, Group; diff --git a/test/Driver/ppc-features.cpp b/test/Driver/ppc-features.cpp index c62f5b9697..f7cc879f39 100644 --- a/test/Driver/ppc-features.cpp +++ b/test/Driver/ppc-features.cpp @@ -89,6 +89,12 @@ // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-fprnd -mfprnd -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-FPRND %s // CHECK-FPRND: "-target-feature" "+fprnd" +// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-cmpb -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCMPB %s +// CHECK-NOCMPB: "-target-feature" "-cmpb" + +// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-cmpb -mcmpb -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CMPB %s +// CHECK-CMPB: "-target-feature" "+cmpb" + // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-vsx -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOVSX %s // CHECK-NOVSX: "-target-feature" "-vsx"