mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
[Driver][PowerPC] Move powerpcspe logic from cc1 to Driver
Follow-up of D72014. It is more appropriate to use a target feature instead of a SubTypeArch to express the difference. Reviewed By: #powerpc, jhibbits Differential Revision: https://reviews.llvm.org/D72433
This commit is contained in:
parent
f28972facc
commit
ba91dffafe
@ -316,8 +316,7 @@ bool PPCTargetInfo::initFeatureMap(
|
||||
.Case("pwr8", true)
|
||||
.Default(false);
|
||||
|
||||
Features["spe"] = getTriple().getSubArch() == llvm::Triple::PPCSubArch_spe ||
|
||||
llvm::StringSwitch<bool>(CPU)
|
||||
Features["spe"] = llvm::StringSwitch<bool>(CPU)
|
||||
.Case("8548", true)
|
||||
.Case("e500", true)
|
||||
.Default(false);
|
||||
|
@ -104,6 +104,9 @@ const char *ppc::getPPCAsmModeForCPU(StringRef Name) {
|
||||
void ppc::getPPCTargetFeatures(const Driver &D, const llvm::Triple &Triple,
|
||||
const ArgList &Args,
|
||||
std::vector<StringRef> &Features) {
|
||||
if (Triple.getSubArch() == llvm::Triple::PPCSubArch_spe)
|
||||
Features.push_back("+spe");
|
||||
|
||||
handleTargetFeaturesGroup(Args, Features, options::OPT_m_ppc_Features_Group);
|
||||
|
||||
ppc::FloatABI FloatABI = ppc::getPPCFloatABI(D, Args);
|
||||
|
@ -168,8 +168,11 @@
|
||||
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-invariant-function-descriptors -minvariant-function-descriptors -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-INVFUNCDESC %s
|
||||
// CHECK-INVFUNCDESC: "-target-feature" "+invariant-function-descriptors"
|
||||
|
||||
// RUN: %clang -target powerpc-unknown-linux-gnu %s -mno-spe -mspe -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-SPE %s
|
||||
// RUN: %clang -target powerpc %s -mno-spe -mspe -c -### 2>&1 | FileCheck -check-prefix=CHECK-SPE %s
|
||||
// RUN: %clang -target powerpcspe %s -c -### 2>&1 | FileCheck -check-prefix=CHECK-SPE %s
|
||||
// RUN: %clang -target powerpcspe %s -mno-spe -c -### 2>&1 | FileCheck -check-prefix=CHECK-NOSPE %s
|
||||
// CHECK-SPE: "-target-feature" "+spe"
|
||||
// CHECK-NOSPE: "-target-feature" "-spe"
|
||||
|
||||
// Assembler features
|
||||
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_BE_AS_ARGS %s
|
||||
|
@ -6551,7 +6551,6 @@
|
||||
// PPC32-LINUX-NOT: _CALL_LINUX
|
||||
//
|
||||
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-unknown-linux-gnu -target-feature +spe < /dev/null | FileCheck -match-full-lines -check-prefix PPC32-SPE %s
|
||||
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpcspe-unknown-linux-gnu < /dev/null | FileCheck -match-full-lines -check-prefix PPC32-SPE %s
|
||||
//
|
||||
// PPC32-SPE:#define __NO_FPRS__ 1
|
||||
// PPC32-SPE:#define __SPE__ 1
|
||||
|
Loading…
Reference in New Issue
Block a user