]> granicus.if.org Git - clang/commitdiff
Add minimal command line support for the VSX powerpc processor.
authorEric Christopher <echristo@gmail.com>
Wed, 16 Oct 2013 20:40:13 +0000 (20:40 +0000)
committerEric Christopher <echristo@gmail.com>
Wed, 16 Oct 2013 20:40:13 +0000 (20:40 +0000)
Preprocessor support is still needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192839 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td
test/Driver/ppc-features.cpp

index 22c4cdca443a969f864508ac35f32366cd287958..d850cb3a6bdba859f893042ecaa95f6bf2b9ad79 100644 (file)
@@ -1017,6 +1017,8 @@ def marm : Flag<["-"], "marm">, Alias<mno_thumb>;
 def ffixed_r9 : Flag<["-"], "ffixed-r9">, Group<m_arm_Features_Group>,
   HelpText<"Reserve the r9 register (ARM only)">;
 
+def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>;
+def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>;
 def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>;
 def mno_fprnd : Flag<["-"], "mno-fprnd">, Group<m_ppc_Features_Group>;
 def mmfcrf : Flag<["-"], "mmfcrf">, Group<m_ppc_Features_Group>;
index 7544c64ad67c7aaf95cfad21c02c51d56a22fa25..6959c629e5813661c01db910fdcd5ebd3ce94d46 100644 (file)
 
 // 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-vsx -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOVSX %s
+// CHECK-NOVSX: "-target-feature" "-vsx"
+
+// 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"
+