forked from OSchip/llvm-project
[ARM] Fix bugs introduced by the fp64/d32 rework.
Change D60691 caused some knock-on failures that weren't caught by the existing tests. Firstly, selecting a CPU that should have had a restricted FPU (e.g. `-mcpu=cortex-m4`, which should have 16 d-regs and no double precision) could give the unrestricted version, because `ARM::getFPUFeatures` returned a list of features including subtracted ones (here `-fp64`,`-d32`), but `ARMTargetInfo::initFeatureMap` threw away all the ones that didn't start with `+`. Secondly, the preprocessor macros didn't reliably match the actual compilation settings: for example, `-mfpu=softvfp` could still set `__ARM_FP` as if hardware FP was available, because the list of features on the cc1 command line would include things like `+vfp4`,`-vfp4d16` and clang didn't realise that one of those cancelled out the other. I've fixed both of these issues by rewriting `ARM::getFPUFeatures` so that it returns a list that enables every FP-related feature compatible with the selected FPU and disables every feature not compatible, which is more verbose but means clang doesn't have to understand the dependency relationships between the backend features. Meanwhile, `ARMTargetInfo::handleTargetFeatures` is testing for all the various forms of the FP feature names, so that it won't miss cases where it should have set `HW_FP` to feed into feature test macros. That in turn caused an ordering problem when handling `-mcpu=foo+bar` together with `-mfpu=something_that_turns_off_bar`. To fix that, I've arranged that the `+bar` suffixes on the end of `-mcpu` and `-march` cause feature names to be put into a separate vector which is concatenated after the output of `getFPUFeatures`. Another side effect of all this is to fix a bug where `clang -target armv8-eabi` by itself would fail to set `__ARM_FEATURE_FMA`, even though `armv8` (aka Arm v8-A) implies FP-Armv8 which has FMA. That was because `HW_FP` was being set to a value including only the `FPARMV8` bit, but that feature test macro was testing only the `VFP4FPU` bit. Now `HW_FP` ends up with all the bits set, so it gives the right answer. Changes to tests included in this patch: * `arm-target-features.c`: I had to change basically all the expected results. (The Cortex-M4 test in there should function as a regression test for the accidental double-precision bug.) * `arm-mfpu.c`, `armv8.1m.main.c`: switched to using `CHECK-DAG` everywhere so that those tests are no longer sensitive to the order of cc1 feature options on the command line. * `arm-acle-6.5.c`: been updated to expect the right answer to that FMA test. * `Preprocessor/arm-target-features.c`: added a regression test for the `mfpu=softvfp` issue. Reviewers: SjoerdMeijer, dmgreen, ostannard, samparker, JamesNagurne Reviewed By: ostannard Subscribers: srhines, javed.absar, kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62998 llvm-svn: 362791
This commit is contained in:
parent
f720647ddd
commit
5d66f2b0af
|
@ -408,18 +408,30 @@ bool ARMTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
|
|||
SoftFloat = true;
|
||||
} else if (Feature == "+soft-float-abi") {
|
||||
SoftFloatABI = true;
|
||||
} else if (Feature == "+vfp2") {
|
||||
} else if (Feature == "+vfp2sp" || Feature == "+vfp2d16sp" ||
|
||||
Feature == "+vfp2" || Feature == "+vfp2d16") {
|
||||
FPU |= VFP2FPU;
|
||||
HW_FP |= HW_FP_SP;
|
||||
} else if (Feature == "+vfp3") {
|
||||
if (Feature == "+vfp2" || Feature == "+vfp2d16")
|
||||
HW_FP |= HW_FP_DP;
|
||||
} else if (Feature == "+vfp3sp" || Feature == "+vfp3d16sp" ||
|
||||
Feature == "+vfp3" || Feature == "+vfp3d16") {
|
||||
FPU |= VFP3FPU;
|
||||
HW_FP |= HW_FP_SP;
|
||||
} else if (Feature == "+vfp4") {
|
||||
if (Feature == "+vfp3" || Feature == "+vfp3d16")
|
||||
HW_FP |= HW_FP_DP;
|
||||
} else if (Feature == "+vfp4sp" || Feature == "+vfp4d16sp" ||
|
||||
Feature == "+vfp4" || Feature == "+vfp4d16") {
|
||||
FPU |= VFP4FPU;
|
||||
HW_FP |= HW_FP_SP | HW_FP_HP;
|
||||
} else if (Feature == "+fp-armv8") {
|
||||
if (Feature == "+vfp4" || Feature == "+vfp4d16")
|
||||
HW_FP |= HW_FP_DP;
|
||||
} else if (Feature == "+fp-armv8sp" || Feature == "+fp-armv8d16sp" ||
|
||||
Feature == "+fp-armv8" || Feature == "+fp-armv8d16") {
|
||||
FPU |= FPARMV8;
|
||||
HW_FP |= HW_FP_SP | HW_FP_HP;
|
||||
if (Feature == "+fp-armv8" || Feature == "+fp-armv8d16")
|
||||
HW_FP |= HW_FP_DP;
|
||||
} else if (Feature == "+neon") {
|
||||
FPU |= NeonFPU;
|
||||
HW_FP |= HW_FP_SP;
|
||||
|
|
|
@ -100,6 +100,7 @@ static void DecodeARMFeaturesFromCPU(const Driver &D, StringRef CPU,
|
|||
static void checkARMArchName(const Driver &D, const Arg *A, const ArgList &Args,
|
||||
llvm::StringRef ArchName, llvm::StringRef CPUName,
|
||||
std::vector<StringRef> &Features,
|
||||
std::vector<StringRef> &ExtensionFeatures,
|
||||
const llvm::Triple &Triple) {
|
||||
std::pair<StringRef, StringRef> Split = ArchName.split("+");
|
||||
|
||||
|
@ -107,7 +108,7 @@ static void checkARMArchName(const Driver &D, const Arg *A, const ArgList &Args,
|
|||
llvm::ARM::ArchKind ArchKind = llvm::ARM::parseArch(MArch);
|
||||
if (ArchKind == llvm::ARM::ArchKind::INVALID ||
|
||||
(Split.second.size() && !DecodeARMFeatures(
|
||||
D, Split.second, CPUName, ArchKind, Features)))
|
||||
D, Split.second, CPUName, ArchKind, ExtensionFeatures)))
|
||||
D.Diag(clang::diag::err_drv_clang_unsupported) << A->getAsString(Args);
|
||||
}
|
||||
|
||||
|
@ -115,6 +116,7 @@ static void checkARMArchName(const Driver &D, const Arg *A, const ArgList &Args,
|
|||
static void checkARMCPUName(const Driver &D, const Arg *A, const ArgList &Args,
|
||||
llvm::StringRef CPUName, llvm::StringRef ArchName,
|
||||
std::vector<StringRef> &Features,
|
||||
std::vector<StringRef> &ExtensionFeatures,
|
||||
const llvm::Triple &Triple) {
|
||||
std::pair<StringRef, StringRef> Split = CPUName.split("+");
|
||||
|
||||
|
@ -123,7 +125,7 @@ static void checkARMCPUName(const Driver &D, const Arg *A, const ArgList &Args,
|
|||
arm::getLLVMArchKindForARM(CPU, ArchName, Triple);
|
||||
if (ArchKind == llvm::ARM::ArchKind::INVALID ||
|
||||
(Split.second.size() && !DecodeARMFeatures(
|
||||
D, Split.second, CPU, ArchKind, Features)))
|
||||
D, Split.second, CPU, ArchKind, ExtensionFeatures)))
|
||||
D.Diag(clang::diag::err_drv_clang_unsupported) << A->getAsString(Args);
|
||||
}
|
||||
|
||||
|
@ -289,6 +291,13 @@ void arm::getARMTargetFeatures(const ToolChain &TC,
|
|||
const Arg *WaCPU = nullptr, *WaFPU = nullptr;
|
||||
const Arg *WaHDiv = nullptr, *WaArch = nullptr;
|
||||
|
||||
// This vector will accumulate features from the architecture
|
||||
// extension suffixes on -mcpu and -march (e.g. the 'bar' in
|
||||
// -mcpu=foo+bar). We want to apply those after the features derived
|
||||
// from the FPU, in case -mfpu generates a negative feature which
|
||||
// the +bar is supposed to override.
|
||||
std::vector<StringRef> ExtensionFeatures;
|
||||
|
||||
if (!ForAS) {
|
||||
// FIXME: Note, this is a hack, the LLVM backend doesn't actually use these
|
||||
// yet (it uses the -mfloat-abi and -msoft-float options), and it is
|
||||
|
@ -351,12 +360,14 @@ void arm::getARMTargetFeatures(const ToolChain &TC,
|
|||
D.Diag(clang::diag::warn_drv_unused_argument)
|
||||
<< ArchArg->getAsString(Args);
|
||||
ArchName = StringRef(WaArch->getValue()).substr(7);
|
||||
checkARMArchName(D, WaArch, Args, ArchName, CPUName, Features, Triple);
|
||||
checkARMArchName(D, WaArch, Args, ArchName, CPUName,
|
||||
Features, ExtensionFeatures, Triple);
|
||||
// FIXME: Set Arch.
|
||||
D.Diag(clang::diag::warn_drv_unused_argument) << WaArch->getAsString(Args);
|
||||
} else if (ArchArg) {
|
||||
ArchName = ArchArg->getValue();
|
||||
checkARMArchName(D, ArchArg, Args, ArchName, CPUName, Features, Triple);
|
||||
checkARMArchName(D, ArchArg, Args, ArchName, CPUName,
|
||||
Features, ExtensionFeatures, Triple);
|
||||
}
|
||||
|
||||
// Add CPU features for generic CPUs
|
||||
|
@ -367,11 +378,12 @@ void arm::getARMTargetFeatures(const ToolChain &TC,
|
|||
Features.push_back(
|
||||
Args.MakeArgString((F.second ? "+" : "-") + F.first()));
|
||||
} else if (!CPUName.empty()) {
|
||||
DecodeARMFeaturesFromCPU(D, CPUName, Features);
|
||||
DecodeARMFeaturesFromCPU(D, CPUName, ExtensionFeatures);
|
||||
}
|
||||
|
||||
if (CPUArg)
|
||||
checkARMCPUName(D, CPUArg, Args, CPUName, ArchName, Features, Triple);
|
||||
checkARMCPUName(D, CPUArg, Args, CPUName, ArchName,
|
||||
Features, ExtensionFeatures, Triple);
|
||||
// Honor -mfpu=. ClangAs gives preference to -Wa,-mfpu=.
|
||||
const Arg *FPUArg = Args.getLastArg(options::OPT_mfpu_EQ);
|
||||
if (WaFPU) {
|
||||
|
@ -389,6 +401,12 @@ void arm::getARMTargetFeatures(const ToolChain &TC,
|
|||
<< std::string("-mfpu=") + AndroidFPU;
|
||||
}
|
||||
|
||||
// Now we've finished accumulating features from arch, cpu and fpu,
|
||||
// we can append the ones for architecture extensions that we
|
||||
// collected separately.
|
||||
Features.insert(std::end(Features),
|
||||
std::begin(ExtensionFeatures), std::end(ExtensionFeatures));
|
||||
|
||||
// Honor -mhwdiv=. ClangAs gives preference to -Wa,-mhwdiv=.
|
||||
const Arg *HDivArg = Args.getLastArg(options::OPT_mhwdiv_EQ);
|
||||
if (WaHDiv) {
|
||||
|
@ -433,21 +451,20 @@ fp16_fml_fallthrough:
|
|||
if (ABI == arm::FloatABI::Soft) {
|
||||
llvm::ARM::getFPUFeatures(llvm::ARM::FK_NONE, Features);
|
||||
|
||||
// Disable hardware FP features which have been enabled.
|
||||
// Disable all features relating to hardware FP.
|
||||
// FIXME: Disabling fpregs should be enough all by itself, since all
|
||||
// the other FP features are dependent on it. However
|
||||
// there is currently no easy way to test this in clang, so for
|
||||
// now just be explicit and disable all known dependent features
|
||||
// as well.
|
||||
for (std::string Feature : {"vfp2", "vfp3", "vfp4", "fp-armv8", "fullfp16",
|
||||
"neon", "crypto", "dotprod", "fp16fml"})
|
||||
if (std::find(std::begin(Features), std::end(Features), "+" + Feature) != std::end(Features))
|
||||
Features.push_back(Args.MakeArgString("-" + Feature));
|
||||
|
||||
// Disable the base feature unconditionally, even if it was not
|
||||
// explicitly in the features list (e.g. if we had +vfp3, which
|
||||
// implies it).
|
||||
Features.push_back("-fpregs");
|
||||
for (std::string Feature : {
|
||||
"vfp2", "vfp2sp", "vfp2d16", "vfp2d16sp",
|
||||
"vfp3", "vfp3sp", "vfp3d16", "vfp3d16sp",
|
||||
"vfp4", "vfp4sp", "vfp4d16", "vfp4d16sp",
|
||||
"fp-armv8", "fp-armv8sp", "fp-armv8d16", "fp-armv8d16sp",
|
||||
"fullfp16", "neon", "crypto", "dotprod", "fp16fml",
|
||||
"fp64", "d32", "fpregs"})
|
||||
Features.push_back(Args.MakeArgString("-" + Feature));
|
||||
}
|
||||
|
||||
// En/disable crc code generation.
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
// REQUIRES: arm-registered-target
|
||||
|
||||
// RUN: %clang_cc1 -triple thumbv7-linux-gnueabihf -target-cpu cortex-a8 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP3
|
||||
// CHECK-VFP3: "target-features"="+armv7-a,+d32,+dsp,+fp64,+neon,+thumb-mode,+vfp3"
|
||||
// CHECK-VFP3: "target-features"="+armv7-a,+d32,+dsp,+fp64,+fpregs,+neon,+thumb-mode,+vfp2,+vfp2d16,+vfp2d16sp,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp"
|
||||
|
||||
|
||||
// RUN: %clang_cc1 -triple thumbv7-linux-gnueabihf -target-cpu cortex-a5 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP4
|
||||
// CHECK-VFP4: "target-features"="+armv7-a,+d32,+dsp,+fp64,+neon,+thumb-mode,+vfp4"
|
||||
// CHECK-VFP4: "target-features"="+armv7-a,+d32,+dsp,+fp16,+fp64,+fpregs,+neon,+thumb-mode,+vfp2,+vfp2d16,+vfp2d16sp,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,+vfp4,+vfp4d16,+vfp4d16sp,+vfp4sp"
|
||||
|
||||
|
||||
// RUN: %clang_cc1 -triple thumbv7-linux-gnueabihf -target-cpu cortex-a7 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP4-DIV
|
||||
// RUN: %clang_cc1 -triple thumbv7-linux-gnueabi -target-cpu cortex-a12 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP4-DIV
|
||||
// RUN: %clang_cc1 -triple thumbv7s-linux-gnueabi -target-cpu swift -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP4-DIV-2
|
||||
// RUN: %clang_cc1 -triple thumbv7-linux-gnueabihf -target-cpu krait -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP4-DIV
|
||||
// CHECK-VFP4-DIV: "target-features"="+armv7-a,+d32,+dsp,+fp64,+hwdiv,+hwdiv-arm,+neon,+thumb-mode,+vfp4"
|
||||
// CHECK-VFP4-DIV-2: "target-features"="+armv7s,+d32,+dsp,+fp64,+hwdiv,+hwdiv-arm,+neon,+thumb-mode,+vfp4"
|
||||
// CHECK-VFP4-DIV: "target-features"="+armv7-a,+d32,+dsp,+fp16,+fp64,+fpregs,+hwdiv,+hwdiv-arm,+neon,+thumb-mode,+vfp2,+vfp2d16,+vfp2d16sp,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,+vfp4,+vfp4d16,+vfp4d16sp,+vfp4sp"
|
||||
// CHECK-VFP4-DIV-2: "target-features"="+armv7s,+d32,+dsp,+fp16,+fp64,+fpregs,+hwdiv,+hwdiv-arm,+neon,+thumb-mode,+vfp2,+vfp2d16,+vfp2d16sp,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,+vfp4,+vfp4d16,+vfp4d16sp,+vfp4sp"
|
||||
|
||||
// RUN: %clang_cc1 -triple armv7-linux-gnueabihf -target-cpu cortex-a15 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP4-DIV-ARM
|
||||
// RUN: %clang_cc1 -triple armv7-linux-gnueabihf -target-cpu cortex-a17 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP4-DIV-ARM
|
||||
// CHECK-VFP4-DIV-ARM: "target-features"="+armv7-a,+d32,+dsp,+fp64,+hwdiv,+hwdiv-arm,+neon,+vfp4,-thumb-mode"
|
||||
// CHECK-VFP4-DIV-ARM: "target-features"="+armv7-a,+d32,+dsp,+fp16,+fp64,+fpregs,+hwdiv,+hwdiv-arm,+neon,+vfp2,+vfp2d16,+vfp2d16sp,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,+vfp4,+vfp4d16,+vfp4d16sp,+vfp4sp,-thumb-mode"
|
||||
|
||||
// RUN: %clang_cc1 -triple thumbv7s-apple-ios7.0 -target-cpu cyclone -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-BASIC-V8
|
||||
// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a32 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-BASIC-V8
|
||||
|
@ -28,34 +28,34 @@
|
|||
// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu exynos-m1 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-BASIC-V8
|
||||
// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu exynos-m2 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-BASIC-V8
|
||||
// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu exynos-m3 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-BASIC-V8
|
||||
// CHECK-BASIC-V8: "target-features"="+armv8-a,+crc,+crypto,+d32,+dsp,+fp-armv8,+fp64,+hwdiv,+hwdiv-arm,+neon,+thumb-mode"
|
||||
// CHECK-BASIC-V8: "target-features"="+armv8-a,+crc,+crypto,+d32,+dsp,+fp-armv8,+fp-armv8d16,+fp-armv8d16sp,+fp-armv8sp,+fp16,+fp64,+fpregs,+hwdiv,+hwdiv-arm,+neon,+thumb-mode,+vfp2,+vfp2d16,+vfp2d16sp,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,+vfp4,+vfp4d16,+vfp4d16sp,+vfp4sp"
|
||||
|
||||
// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu exynos-m4 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-BASIC-V82
|
||||
// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu exynos-m5 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-BASIC-V82
|
||||
// CHECK-BASIC-V82: "target-features"="+armv8.2-a,+crc,+crypto,+d32,+dotprod,+dsp,+fp-armv8,+fp64,+hwdiv,+hwdiv-arm,+neon,+ras,+thumb-mode"
|
||||
// CHECK-BASIC-V82: "target-features"="+armv8.2-a,+crc,+crypto,+d32,+dotprod,+dsp,+fp-armv8,+fp-armv8d16,+fp-armv8d16sp,+fp-armv8sp,+fp16,+fp64,+fpregs,+hwdiv,+hwdiv-arm,+neon,+ras,+thumb-mode,+vfp2,+vfp2d16,+vfp2d16sp,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,+vfp4,+vfp4d16,+vfp4d16sp,+vfp4sp"
|
||||
|
||||
// RUN: %clang_cc1 -triple armv8-linux-gnueabi -target-cpu cortex-a53 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-BASIC-V8-ARM
|
||||
// CHECK-BASIC-V8-ARM: "target-features"="+armv8-a,+crc,+crypto,+d32,+dsp,+fp-armv8,+fp64,+hwdiv,+hwdiv-arm,+neon,-thumb-mode"
|
||||
// CHECK-BASIC-V8-ARM: "target-features"="+armv8-a,+crc,+crypto,+d32,+dsp,+fp-armv8,+fp-armv8d16,+fp-armv8d16sp,+fp-armv8sp,+fp16,+fp64,+fpregs,+hwdiv,+hwdiv-arm,+neon,+vfp2,+vfp2d16,+vfp2d16sp,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,+vfp4,+vfp4d16,+vfp4d16sp,+vfp4sp,-thumb-mode"
|
||||
|
||||
// RUN: %clang_cc1 -triple thumbv7-linux-gnueabi -target-cpu cortex-r5 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP3-D16-DIV
|
||||
// CHECK-VFP3-D16-DIV: "target-features"="+armv7-r,+dsp,+fp64,+hwdiv,+hwdiv-arm,+thumb-mode,+vfp3"
|
||||
// CHECK-VFP3-D16-DIV: "target-features"="+armv7-r,+dsp,+fp64,+fpregs,+hwdiv,+hwdiv-arm,+thumb-mode,+vfp2d16,+vfp2d16sp,+vfp3d16,+vfp3d16sp"
|
||||
|
||||
|
||||
// RUN: %clang_cc1 -triple armv7-linux-gnueabi -target-cpu cortex-r4f -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP3-D16-THUMB-DIV
|
||||
// CHECK-VFP3-D16-THUMB-DIV: "target-features"="+armv7-r,+dsp,+fp64,+hwdiv,+vfp3,-thumb-mode"
|
||||
// CHECK-VFP3-D16-THUMB-DIV: "target-features"="+armv7-r,+dsp,+fp64,+fpregs,+hwdiv,+vfp2d16,+vfp2d16sp,+vfp3d16,+vfp3d16sp,-thumb-mode"
|
||||
|
||||
|
||||
// RUN: %clang_cc1 -triple thumbv7-linux-gnueabi -target-cpu cortex-r7 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP3-D16-FP16-DIV
|
||||
// RUN: %clang_cc1 -triple thumbv7-linux-gnueabi -target-cpu cortex-r8 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP3-D16-FP16-DIV
|
||||
// CHECK-VFP3-D16-FP16-DIV: "target-features"="+armv7-r,+dsp,+fp16,+fp64,+hwdiv,+hwdiv-arm,+thumb-mode,+vfp3"
|
||||
// CHECK-VFP3-D16-FP16-DIV: "target-features"="+armv7-r,+dsp,+fp16,+fp64,+fpregs,+hwdiv,+hwdiv-arm,+thumb-mode,+vfp2d16,+vfp2d16sp,+vfp3d16,+vfp3d16sp"
|
||||
|
||||
|
||||
// RUN: %clang_cc1 -triple thumbv7-linux-gnueabi -target-cpu cortex-m4 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP4-D16-SP-THUMB-DIV
|
||||
// CHECK-VFP4-D16-SP-THUMB-DIV: "target-features"="+armv7e-m,+dsp,+hwdiv,+thumb-mode,+vfp4"
|
||||
// CHECK-VFP4-D16-SP-THUMB-DIV: "target-features"="+armv7e-m,+dsp,+fp16,+fpregs,+hwdiv,+thumb-mode,+vfp2d16sp,+vfp3d16sp,+vfp4d16sp"
|
||||
|
||||
|
||||
// RUN: %clang_cc1 -triple thumbv7-linux-gnueabi -target-cpu cortex-m7 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-VFP5-D16-THUMB-DIV
|
||||
// CHECK-VFP5-D16-THUMB-DIV: "target-features"="+armv7e-m,+dsp,+fp-armv8,+fp64,+hwdiv,+thumb-mode"
|
||||
// CHECK-VFP5-D16-THUMB-DIV: "target-features"="+armv7e-m,+dsp,+fp-armv8d16,+fp-armv8d16sp,+fp16,+fp64,+fpregs,+hwdiv,+thumb-mode,+vfp2d16,+vfp2d16sp,+vfp3d16,+vfp3d16sp,+vfp4d16,+vfp4d16sp"
|
||||
|
||||
|
||||
// RUN: %clang_cc1 -triple armv7-linux-gnueabi -target-cpu cortex-r4 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-THUMB-DIV
|
||||
|
@ -107,6 +107,6 @@
|
|||
// CHECK-ARMV8M-M23-LINUX: "target-features"="+armv8-m.base,+hwdiv,+thumb-mode"
|
||||
|
||||
// RUN: %clang_cc1 -triple thumb-linux-gnueabi -target-cpu cortex-m33 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-ARMV8M-MAIN-LINUX
|
||||
// CHECK-ARMV8M-MAIN-LINUX: "target-features"="+armv8-m.main,+dsp,+fp-armv8,+hwdiv,+thumb-mode"
|
||||
// CHECK-ARMV8M-MAIN-LINUX: "target-features"="+armv8-m.main,+dsp,+fp-armv8d16sp,+fp16,+fpregs,+hwdiv,+thumb-mode,+vfp2d16sp,+vfp3d16sp,+vfp4d16sp"
|
||||
|
||||
void foo() {}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// RUN: %clang -target arm-linux-eabi %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s
|
||||
// CHECK-DEFAULT-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-DEFAULT: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-DEFAULT-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-DEFAULT-NOT: "-target-feature" "+vfp2"
|
||||
// CHECK-DEFAULT-NOT: "-target-feature" "+vfp3"
|
||||
// CHECK-DEFAULT-NOT: "-target-feature" "+neon"
|
||||
|
@ -23,19 +23,19 @@
|
|||
// RUN: %clang -target arm-linux-eabi -mfpu=vfp %s -mfloat-abi=soft -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-2 %s
|
||||
// CHECK-VFP-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-VFP: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP: "-target-feature" "+vfp2"
|
||||
// CHECK-VFP: "-target-feature" "-vfp3"
|
||||
// CHECK-VFP: "-target-feature" "-vfp4"
|
||||
// CHECK-VFP: "-target-feature" "-fp-armv8"
|
||||
// CHECK-VFP: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-2: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-2: "-target-feature" "-vfp3"
|
||||
// CHECK-SOFT-ABI-FP-2: "-target-feature" "-vfp4"
|
||||
// CHECK-SOFT-ABI-FP-2: "-target-feature" "-fp-armv8"
|
||||
// CHECK-SOFT-ABI-FP-2: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-2: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-2: "-target-feature" "-vfp2"
|
||||
// CHECK-VFP-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP-DAG: "-target-feature" "+vfp2"
|
||||
// CHECK-VFP-DAG: "-target-feature" "-vfp3d16sp"
|
||||
// CHECK-VFP-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-VFP-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-VFP-DAG: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-vfp3d16sp"
|
||||
// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-vfp2d16sp"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfp3 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-VFP3 %s
|
||||
|
@ -44,33 +44,33 @@
|
|||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
|
||||
// CHECK-VFP3-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-VFP3: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3: "-target-feature" "+vfp3"
|
||||
// CHECK-VFP3: "-target-feature" "-vfp4"
|
||||
// CHECK-VFP3: "-target-feature" "-fp-armv8"
|
||||
// CHECK-VFP3: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-3: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-3: "-target-feature" "-vfp2"
|
||||
// CHECK-SOFT-ABI-FP-3: "-target-feature" "-vfp4"
|
||||
// CHECK-SOFT-ABI-FP-3: "-target-feature" "-fp-armv8"
|
||||
// CHECK-SOFT-ABI-FP-3: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-3: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-3: "-target-feature" "-vfp3"
|
||||
// CHECK-VFP3-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3-DAG: "-target-feature" "+vfp3"
|
||||
// CHECK-VFP3-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-VFP3-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-VFP3-DAG: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-vfp2d16sp"
|
||||
// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-vfp3d16sp"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-fp16 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-VFP3-FP16 %s
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
|
||||
// CHECK-VFP3-FP16-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-VFP3-FP16: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3-FP16: "-target-feature" "+vfp3"
|
||||
// CHECK-VFP3-FP16: "-target-feature" "+fp16"
|
||||
// CHECK-VFP3-FP16: "-target-feature" "-vfp4"
|
||||
// CHECK-VFP3-FP16: "-target-feature" "-fp-armv8"
|
||||
// CHECK-VFP3-FP16: "-target-feature" "+fp64"
|
||||
// CHECK-VFP3-FP16: "-target-feature" "+d32"
|
||||
// CHECK-VFP3-FP16: "-target-feature" "-neon"
|
||||
// CHECK-VFP3-FP16: "-target-feature" "-crypto"
|
||||
// CHECK-VFP3-FP16-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3-FP16-DAG: "-target-feature" "+vfp3"
|
||||
// CHECK-VFP3-FP16-DAG: "-target-feature" "+fp16"
|
||||
// CHECK-VFP3-FP16-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-VFP3-FP16-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-VFP3-FP16-DAG: "-target-feature" "+fp64"
|
||||
// CHECK-VFP3-FP16-DAG: "-target-feature" "+d32"
|
||||
// CHECK-VFP3-FP16-DAG: "-target-feature" "-neon"
|
||||
// CHECK-VFP3-FP16-DAG: "-target-feature" "-crypto"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfp3-d16 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s
|
||||
|
@ -79,58 +79,58 @@
|
|||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
|
||||
// CHECK-VFP3-D16-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-VFP3-D16: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3-D16: "-target-feature" "+vfp3"
|
||||
// CHECK-VFP3-D16: "-target-feature" "-vfp4"
|
||||
// CHECK-VFP3-D16: "-target-feature" "-fp-armv8"
|
||||
// CHECK-VFP3-D16: "-target-feature" "+fp64"
|
||||
// CHECK-VFP3-D16-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3-D16-DAG: "-target-feature" "+vfp3d16"
|
||||
// CHECK-VFP3-D16-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-VFP3-D16-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-VFP3-D16-DAG: "-target-feature" "+fp64"
|
||||
// CHECK-VFP3-D16-NOT: "-target-feature" "+d32"
|
||||
// CHECK-VFP3-D16: "-target-feature" "-neon"
|
||||
// CHECK-VFP3-D16-DAG: "-target-feature" "-neon"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16-fp16 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16-FP16 %s
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
|
||||
// CHECK-VFP3-D16-FP16-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-VFP3-D16-FP16: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3-D16-FP16: "-target-feature" "+vfp3"
|
||||
// CHECK-VFP3-D16-FP16: "-target-feature" "+fp16"
|
||||
// CHECK-VFP3-D16-FP16: "-target-feature" "-vfp4"
|
||||
// CHECK-VFP3-D16-FP16: "-target-feature" "-fp-armv8"
|
||||
// CHECK-VFP3-D16-FP16: "-target-feature" "+fp64"
|
||||
// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "+vfp3d16"
|
||||
// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "+fp16"
|
||||
// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "+fp64"
|
||||
// CHECK-VFP3-D16-FP16-NOT: "-target-feature" "+d32"
|
||||
// CHECK-VFP3-D16-FP16: "-target-feature" "-neon"
|
||||
// CHECK-VFP3-D16-FP16: "-target-feature" "-crypto"
|
||||
// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "-neon"
|
||||
// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "-crypto"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-VFP3XD %s
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
|
||||
// CHECK-VFP3XD-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-VFP3XD: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3XD-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3XD-NOT: "-target-feature" "+fp64"
|
||||
// CHECK-VFP3XD-NOT: "-target-feature" "+d32"
|
||||
// CHECK-VFP3XD: "-target-feature" "+vfp3"
|
||||
// CHECK-VFP3XD: "-target-feature" "-fp16"
|
||||
// CHECK-VFP3XD: "-target-feature" "-vfp4"
|
||||
// CHECK-VFP3XD: "-target-feature" "-fp-armv8"
|
||||
// CHECK-VFP3XD: "-target-feature" "-neon"
|
||||
// CHECK-VFP3XD: "-target-feature" "-crypto"
|
||||
// CHECK-VFP3XD-DAG: "-target-feature" "+vfp3d16sp"
|
||||
// CHECK-VFP3XD-DAG: "-target-feature" "-fp16"
|
||||
// CHECK-VFP3XD-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-VFP3XD-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-VFP3XD-DAG: "-target-feature" "-neon"
|
||||
// CHECK-VFP3XD-DAG: "-target-feature" "-crypto"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd-fp16 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-VFP3XD-FP16 %s
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
|
||||
// CHECK-VFP3XD-FP16-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-VFP3XD-FP16: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3XD-FP16: "-target-feature" "+vfp3"
|
||||
// CHECK-VFP3XD-FP16: "-target-feature" "+fp16"
|
||||
// CHECK-VFP3XD-FP16: "-target-feature" "-vfp4"
|
||||
// CHECK-VFP3XD-FP16: "-target-feature" "-fp-armv8"
|
||||
// CHECK-VFP3XD-FP16-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP3XD-FP16-DAG: "-target-feature" "+vfp3d16sp"
|
||||
// CHECK-VFP3XD-FP16-DAG: "-target-feature" "+fp16"
|
||||
// CHECK-VFP3XD-FP16-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-VFP3XD-FP16-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-VFP3XD-FP16-NOT: "-target-feature" "+fp64"
|
||||
// CHECK-VFP3XD-FP16-NOT: "-target-feature" "+d32"
|
||||
// CHECK-VFP3XD-FP16: "-target-feature" "-neon"
|
||||
// CHECK-VFP3XD-FP16: "-target-feature" "-crypto"
|
||||
// CHECK-VFP3XD-FP16-DAG: "-target-feature" "-neon"
|
||||
// CHECK-VFP3XD-FP16-DAG: "-target-feature" "-crypto"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfp4 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-VFP4 %s
|
||||
|
@ -139,17 +139,17 @@
|
|||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-4 %s
|
||||
// CHECK-VFP4-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-VFP4: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP4: "-target-feature" "+vfp4"
|
||||
// CHECK-VFP4: "-target-feature" "-fp-armv8"
|
||||
// CHECK-VFP4: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-4: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-4: "-target-feature" "-vfp2"
|
||||
// CHECK-SOFT-ABI-FP-4: "-target-feature" "-vfp3"
|
||||
// CHECK-SOFT-ABI-FP-4: "-target-feature" "-fp-armv8"
|
||||
// CHECK-SOFT-ABI-FP-4: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-4: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-4: "-target-feature" "-vfp4"
|
||||
// CHECK-VFP4-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP4-DAG: "-target-feature" "+vfp4"
|
||||
// CHECK-VFP4-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-VFP4-DAG: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-vfp2d16sp"
|
||||
// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-vfp3d16sp"
|
||||
// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-vfp4d16sp"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=vfp4-d16 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s
|
||||
|
@ -158,12 +158,12 @@
|
|||
// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4-d16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-4 %s
|
||||
// CHECK-VFP4-D16-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-VFP4-D16: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP4-D16: "-target-feature" "+vfp4"
|
||||
// CHECK-VFP4-D16: "-target-feature" "-fp-armv8"
|
||||
// CHECK-VFP4-D16: "-target-feature" "+fp64"
|
||||
// CHECK-VFP4-D16-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-VFP4-D16-DAG: "-target-feature" "+vfp4d16"
|
||||
// CHECK-VFP4-D16-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-VFP4-D16-DAG: "-target-feature" "+fp64"
|
||||
// CHECK-VFP4-D16-NOT: "-target-feature" "+d32"
|
||||
// CHECK-VFP4-D16: "-target-feature" "-neon"
|
||||
// CHECK-VFP4-D16-DAG: "-target-feature" "-neon"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=fp4-sp-d16 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-FP4-SP-D16 %s
|
||||
|
@ -172,12 +172,12 @@
|
|||
// RUN: %clang -target arm-linux-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-4 %s
|
||||
// CHECK-FP4-SP-D16-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-FP4-SP-D16: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-FP4-SP-D16: "-target-feature" "+vfp4"
|
||||
// CHECK-FP4-SP-D16: "-target-feature" "-fp-armv8"
|
||||
// CHECK-FP4-SP-D16-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-FP4-SP-D16-DAG: "-target-feature" "+vfp4d16sp"
|
||||
// CHECK-FP4-SP-D16-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-FP4-SP-D16-NOT: "-target-feature" "+fp64"
|
||||
// CHECK-FP4-SP-D16-NOT: "-target-feature" "+d32"
|
||||
// CHECK-FP4-SP-D16: "-target-feature" "-neon"
|
||||
// CHECK-FP4-SP-D16-DAG: "-target-feature" "-neon"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=fp5-sp-d16 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-FP5-SP-D16 %s
|
||||
|
@ -186,12 +186,12 @@
|
|||
// RUN: %clang -target arm-linux-eabi -mfpu=fp-armv8-sp-d16 -mfloat-abi=soft %s -### -o %t.o \
|
||||
// RUN: 2>&1 | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
|
||||
// CHECK-FP5-SP-D16-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-FP5-SP-D16: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-FP5-SP-D16: "-target-feature" "+fp-armv8"
|
||||
// CHECK-FP5-SP-D16: "-target-feature" "-neon"
|
||||
// CHECK-FP5-SP-D16-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-FP5-SP-D16-DAG: "-target-feature" "+fp-armv8d16sp"
|
||||
// CHECK-FP5-SP-D16-DAG: "-target-feature" "-neon"
|
||||
// CHECK-FP5-SP-D16-NOT: "-target-feature" "+fp64"
|
||||
// CHECK-FP5-SP-D16-NOT: "-target-feature" "+d32"
|
||||
// CHECK-FP5-SP-D16: "-target-feature" "-crypto"
|
||||
// CHECK-FP5-SP-D16-DAG: "-target-feature" "-crypto"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=fp5-dp-d16 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-FP5-DP-D16 %s
|
||||
|
@ -200,74 +200,74 @@
|
|||
// RUN: %clang -target arm-linux-eabi -mfpu=fpv5-dp-d16 %s -mfloat-abi=soft -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-5 %s
|
||||
// CHECK-FP5-DP-D16-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-FP5-DP-D16: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-FP5-DP-D16: "-target-feature" "+fp-armv8"
|
||||
// CHECK-FP5-DP-D16: "-target-feature" "+fp64"
|
||||
// CHECK-FP5-DP-D16-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-FP5-DP-D16-DAG: "-target-feature" "+fp-armv8d16"
|
||||
// CHECK-FP5-DP-D16-DAG: "-target-feature" "+fp64"
|
||||
// CHECK-FP5-DP-D16-NOT: "-target-feature" "+d32"
|
||||
// CHECK-FP5-DP-D16: "-target-feature" "-neon"
|
||||
// CHECK-FP5-DP-D16: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-5: "-target-feature" "+soft-float"
|
||||
// CHECK-SOFT-ABI-FP-5: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-5: "-target-feature" "-vfp2"
|
||||
// CHECK-SOFT-ABI-FP-5: "-target-feature" "-vfp3"
|
||||
// CHECK-SOFT-ABI-FP-5: "-target-feature" "-vfp4"
|
||||
// CHECK-SOFT-ABI-FP-5: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-5: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-5: "-target-feature" "-fp-armv8"
|
||||
// CHECK-FP5-DP-D16-DAG: "-target-feature" "-neon"
|
||||
// CHECK-FP5-DP-D16-DAG: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "+soft-float"
|
||||
// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-vfp2d16sp"
|
||||
// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-vfp3d16sp"
|
||||
// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=neon %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-NEON %s
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=neon -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-6 %s
|
||||
// CHECK-NEON-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-NEON: "-target-feature" "+neon"
|
||||
// CHECK-SOFT-ABI-FP-6: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-6: "-target-feature" "-vfp2"
|
||||
// CHECK-SOFT-ABI-FP-6: "-target-feature" "-vfp4"
|
||||
// CHECK-SOFT-ABI-FP-6: "-target-feature" "-fp-armv8"
|
||||
// CHECK-SOFT-ABI-FP-6: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-6: "-target-feature" "-vfp3"
|
||||
// CHECK-SOFT-ABI-FP-6: "-target-feature" "-neon"
|
||||
// CHECK-NEON-DAG: "-target-feature" "+neon"
|
||||
// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-vfp2d16sp"
|
||||
// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-vfp3d16sp"
|
||||
// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-neon"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=neon-fp16 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-NEON-FP16 %s
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=neon-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-6 %s
|
||||
// CHECK-NEON-FP16-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-NEON-FP16: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-NEON-FP16: "-target-feature" "+vfp3"
|
||||
// CHECK-NEON-FP16: "-target-feature" "+fp16"
|
||||
// CHECK-NEON-FP16: "-target-feature" "-vfp4"
|
||||
// CHECK-NEON-FP16: "-target-feature" "-fp-armv8"
|
||||
// CHECK-NEON-FP16: "-target-feature" "+fp64"
|
||||
// CHECK-NEON-FP16: "-target-feature" "+d32"
|
||||
// CHECK-NEON-FP16: "-target-feature" "+neon"
|
||||
// CHECK-NEON-FP16: "-target-feature" "-crypto"
|
||||
// CHECK-NEON-FP16-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-NEON-FP16-DAG: "-target-feature" "+vfp3"
|
||||
// CHECK-NEON-FP16-DAG: "-target-feature" "+fp16"
|
||||
// CHECK-NEON-FP16-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-NEON-FP16-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-NEON-FP16-DAG: "-target-feature" "+fp64"
|
||||
// CHECK-NEON-FP16-DAG: "-target-feature" "+d32"
|
||||
// CHECK-NEON-FP16-DAG: "-target-feature" "+neon"
|
||||
// CHECK-NEON-FP16-DAG: "-target-feature" "-crypto"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv3 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV3 %s
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv3 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-6 %s
|
||||
// CHECK-NEON-VFPV3-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-NEON-VFPV3: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-NEON-VFPV3: "-target-feature" "+vfp3"
|
||||
// CHECK-NEON-VFPV3: "-target-feature" "+neon"
|
||||
// CHECK-NEON-VFPV3-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-NEON-VFPV3-DAG: "-target-feature" "+vfp3"
|
||||
// CHECK-NEON-VFPV3-DAG: "-target-feature" "+neon"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv4 %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV4 %s
|
||||
// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv4 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-7 %s
|
||||
// CHECK-NEON-VFPV4-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-NEON-VFPV4: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-NEON-VFPV4: "-target-feature" "+vfp4"
|
||||
// CHECK-NEON-VFPV4: "-target-feature" "+neon"
|
||||
// CHECK-SOFT-ABI-FP-7: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-7: "-target-feature" "-vfp2"
|
||||
// CHECK-SOFT-ABI-FP-7: "-target-feature" "-vfp3"
|
||||
// CHECK-SOFT-ABI-FP-7: "-target-feature" "-fp-armv8"
|
||||
// CHECK-SOFT-ABI-FP-7: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-7: "-target-feature" "-vfp4"
|
||||
// CHECK-SOFT-ABI-FP-7: "-target-feature" "-neon"
|
||||
// CHECK-NEON-VFPV4-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-NEON-VFPV4-DAG: "-target-feature" "+vfp4"
|
||||
// CHECK-NEON-VFPV4-DAG: "-target-feature" "+neon"
|
||||
// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-vfp2d16sp"
|
||||
// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-vfp3d16sp"
|
||||
// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-neon"
|
||||
|
||||
// RUN: %clang -target arm-linux-eabi -msoft-float %s -### -o %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
|
||||
|
@ -275,58 +275,58 @@
|
|||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
|
||||
// RUN: %clang -target armv8a -mfpu=neon %s -### -c 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-8 %s
|
||||
// CHECK-SOFT-ABI-FP-8: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-8: "-target-feature" "-vfp2"
|
||||
// CHECK-SOFT-ABI-FP-8: "-target-feature" "-vfp4"
|
||||
// CHECK-SOFT-ABI-FP-8: "-target-feature" "-fp-armv8"
|
||||
// CHECK-SOFT-ABI-FP-8: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-8: "-target-feature" "-vfp3"
|
||||
// CHECK-SOFT-ABI-FP-8: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-vfp2d16sp"
|
||||
// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-vfp3d16sp"
|
||||
// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-neon"
|
||||
|
||||
// RUN: %clang -target armv8 -mfpu=fp-armv8 %s -### 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-ARMV8-SOFT-FLOAT %s
|
||||
// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "+soft-float"
|
||||
// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-ARMV8-SOFT-FLOAT-DAG: "-target-feature" "+soft-float"
|
||||
// CHECK-ARMV8-SOFT-FLOAT-DAG: "-target-feature" "+soft-float-abi"
|
||||
// NOT-CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "+fp-armv8"
|
||||
// CHECK-ARMV9-SOFT-FLOAT: "-target-feature" "-neon"
|
||||
// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-crypto"
|
||||
// CHECK-ARMV9-SOFT-FLOAT-DAG: "-target-feature" "-neon"
|
||||
// CHECK-ARMV8-SOFT-FLOAT-DAG: "-target-feature" "-crypto"
|
||||
|
||||
// RUN: %clang -target armv8-linux-gnueabihf -mfpu=fp-armv8 %s -### 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-FP-ARMV8 %s
|
||||
// CHECK-FP-ARMV8-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-FP-ARMV8-NOT: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-FP-ARMV8: "-target-feature" "+fp-armv8"
|
||||
// CHECK-FP-ARMV8: "-target-feature" "-neon"
|
||||
// CHECK-FP-ARMV8: "-target-feature" "-crypto"
|
||||
// CHECK-FP-ARMV8-DAG: "-target-feature" "+fp-armv8"
|
||||
// CHECK-FP-ARMV8-DAG: "-target-feature" "-neon"
|
||||
// CHECK-FP-ARMV8-DAG: "-target-feature" "-crypto"
|
||||
|
||||
// RUN: %clang -target armv8-linux-gnueabihf -mfpu=neon-fp-armv8 %s -### 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-NEON-FP-ARMV8 %s
|
||||
// CHECK-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-NEON-FP-ARMV8: "-target-feature" "+fp-armv8"
|
||||
// CHECK-NEON-FP-ARMV8: "-target-feature" "+neon"
|
||||
// CHECK-NEON-FP-ARMV8: "-target-feature" "-crypto"
|
||||
// CHECK-NEON-FP-ARMV8-DAG: "-target-feature" "+fp-armv8"
|
||||
// CHECK-NEON-FP-ARMV8-DAG: "-target-feature" "+neon"
|
||||
// CHECK-NEON-FP-ARMV8-DAG: "-target-feature" "-crypto"
|
||||
|
||||
// RUN: %clang -target armv8-linux-gnueabihf -mfpu=crypto-neon-fp-armv8 %s -### 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-CRYPTO-NEON-FP-ARMV8 %s
|
||||
// CHECK-CRYPTO-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-CRYPTO-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+fp-armv8"
|
||||
// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+crypto"
|
||||
// CHECK-CRYPTO-NEON-FP-ARMV8-DAG: "-target-feature" "+fp-armv8"
|
||||
// CHECK-CRYPTO-NEON-FP-ARMV8-DAG: "-target-feature" "+crypto"
|
||||
|
||||
// RUN: %clang -target armv8-linux-gnueabi -mfpu=none %s -### 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-NO-FP %s
|
||||
// CHECK-NO-FP-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-NO-FP: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-NO-FP: "-target-feature" "-fpregs"
|
||||
// CHECK-NO-FP: "-target-feature" "-vfp2"
|
||||
// CHECK-NO-FP: "-target-feature" "-vfp3"
|
||||
// CHECK-NO-FP: "-target-feature" "-vfp4"
|
||||
// CHECK-NO-FP: "-target-feature" "-fp-armv8"
|
||||
// CHECK-NO-FP-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-NO-FP-DAG: "-target-feature" "-fpregs"
|
||||
// CHECK-NO-FP-DAG: "-target-feature" "-vfp2d16sp"
|
||||
// CHECK-NO-FP-DAG: "-target-feature" "-vfp3d16sp"
|
||||
// CHECK-NO-FP-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-NO-FP-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-NO-FP-NOT: "-target-feature" "+fp64"
|
||||
// CHECK-NO-FP-NOT: "-target-feature" "+d32"
|
||||
// CHECK-NO-FP: "-target-feature" "-neon"
|
||||
// CHECK-NO-FP: "-target-feature" "-crypto"
|
||||
// CHECK-NO-FP-DAG: "-target-feature" "-neon"
|
||||
// CHECK-NO-FP-DAG: "-target-feature" "-crypto"
|
||||
|
||||
// RUN: %clang -target arm-linux-gnueabihf %s -### 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-HF %s
|
||||
|
@ -334,7 +334,7 @@
|
|||
// RUN: | FileCheck --check-prefix=CHECK-HF %s
|
||||
// CHECK-HF-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-HF-NOT: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-HF: "-target-cpu" "arm1176jzf-s"
|
||||
// CHECK-HF-DAG: "-target-cpu" "arm1176jzf-s"
|
||||
|
||||
// RUN: %clang -target armv7-apple-darwin -x assembler %s -### -c 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=ASM %s
|
||||
|
@ -356,20 +356,20 @@
|
|||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
|
||||
// RUN: %clang -target armv8-linux-gnueabi -msoft-float %s -### -c 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
|
||||
// CHECK-SOFT-ABI-FP: "-target-feature" "+soft-float"
|
||||
// CHECK-SOFT-ABI-FP: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP: "-target-feature" "-vfp2"
|
||||
// CHECK-SOFT-ABI-FP: "-target-feature" "-vfp3"
|
||||
// CHECK-SOFT-ABI-FP: "-target-feature" "-vfp4"
|
||||
// CHECK-SOFT-ABI-FP: "-target-feature" "-fp-armv8"
|
||||
// CHECK-SOFT-ABI-FP: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP: "-target-feature" "-fpregs"
|
||||
// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "+soft-float"
|
||||
// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-vfp2d16sp"
|
||||
// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-vfp3d16sp"
|
||||
// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-vfp4d16sp"
|
||||
// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-fp-armv8d16sp"
|
||||
// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-neon"
|
||||
// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-crypto"
|
||||
// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-fpregs"
|
||||
|
||||
// RUN: %clang -target arm-linux-androideabi21 %s -### -c 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-ARM5-ANDROID-FP-DEFAULT %s
|
||||
// CHECK-ARM5-ANDROID-FP-DEFAULT: "-target-feature" "+soft-float"
|
||||
// CHECK-ARM5-ANDROID-FP-DEFAULT: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-ARM5-ANDROID-FP-DEFAULT-DAG: "-target-feature" "+soft-float"
|
||||
// CHECK-ARM5-ANDROID-FP-DEFAULT-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+d32"
|
||||
// CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+vfp3"
|
||||
// CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+vfp4"
|
||||
|
@ -380,19 +380,19 @@
|
|||
// RUN: %clang -target armv7-linux-androideabi21 %s -### -c 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-ARM7-ANDROID-FP-DEFAULT %s
|
||||
// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-ARM7-ANDROID-FP-DEFAULT: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-ARM7-ANDROID-FP-DEFAULT: "-target-feature" "+vfp3"
|
||||
// CHECK-ARM7-ANDROID-FP-DEFAULT-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-ARM7-ANDROID-FP-DEFAULT-DAG: "-target-feature" "+vfp3"
|
||||
// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+vfp4"
|
||||
// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+fp-armv8"
|
||||
// CHECK-ARM7-ANDROID-FP-DEFAULT: "-target-feature" "+neon"
|
||||
// CHECK-ARM7-ANDROID-FP-DEFAULT-DAG: "-target-feature" "+neon"
|
||||
// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+crypto"
|
||||
|
||||
// RUN: %clang -target armv7-linux-androideabi21 %s -mfpu=vfp3-d16 -### -c 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-ARM7-ANDROID-FP-D16 %s
|
||||
// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+soft-float"
|
||||
// CHECK-ARM7-ANDROID-FP-D16: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-ARM7-ANDROID-FP-D16-DAG: "-target-feature" "+soft-float-abi"
|
||||
// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+d32"
|
||||
// CHECK-ARM7-ANDROID-FP-D16: "-target-feature" "+vfp3"
|
||||
// CHECK-ARM7-ANDROID-FP-D16-DAG: "-target-feature" "+vfp3d16"
|
||||
// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+vfp4"
|
||||
// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+fp-armv8"
|
||||
// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+neon"
|
||||
|
|
|
@ -4,37 +4,50 @@
|
|||
|
||||
// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+fp -### %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-FP < %t %s
|
||||
// CHECK-FP: "-target-feature" "+fp-armv8"
|
||||
// CHECK-FP-DAG: "-target-feature" "+fp-armv8d16sp"
|
||||
// CHECK-FP-NOT: "-target-feature" "+fp-armv8d16"
|
||||
// CHECK-FP-NOT: "-target-feature" "+fp-armv8sp"
|
||||
// CHECK-FP-NOT: "-target-feature" "+fp-armv8"
|
||||
// CHECK-FP-NOT: "-target-feature" "+fp64"
|
||||
// CHECK-FP-NOT: "-target-feature" "+d32"
|
||||
// CHECK-FP: "-target-feature" "+fullfp16"
|
||||
// CHECK-FP-DAG: "-target-feature" "+fullfp16"
|
||||
|
||||
// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+nofp -### %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-NOFP < %t %s
|
||||
// CHECK-NOFP: "-target-feature" "-vfp2" "-target-feature" "-vfp3" "-target-feature" "-fp16" "-target-feature" "-vfp4" "-target-feature" "-fp-armv8" "-target-feature" "-fp64" "-target-feature" "-d32" "-target-feature" "-neon" "-target-feature" "-crypto"
|
||||
// CHECK-NOFP-DAG: "-target-feature" "-vfp2"
|
||||
// CHECK-NOFP-DAG: "-target-feature" "-vfp3"
|
||||
// CHECK-NOFP-DAG: "-target-feature" "-fp16"
|
||||
// CHECK-NOFP-DAG: "-target-feature" "-vfp4"
|
||||
// CHECK-NOFP-DAG: "-target-feature" "-fp-armv8"
|
||||
// CHECK-NOFP-DAG: "-target-feature" "-fp64"
|
||||
// CHECK-NOFP-DAG: "-target-feature" "-d32"
|
||||
// CHECK-NOFP-DAG: "-target-feature" "-neon"
|
||||
// CHECK-NOFP-DAG: "-target-feature" "-crypto"
|
||||
|
||||
// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+fp.dp -### %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-FPDP < %t %s
|
||||
// CHECK-FPDP: "-target-feature" "+fp-armv8"
|
||||
// CHECK-FPDP: "-target-feature" "+fullfp16"
|
||||
// CHECK-FPDP: "-target-feature" "+fp64"
|
||||
// CHECK-FPDP-NOT: "-target-feature" "+fp-armv8sp"
|
||||
// CHECK-FPDP-DAG: "-target-feature" "+fp-armv8d16"
|
||||
// CHECK-FPDP-NOT: "-target-feature" "+fp-armv8"
|
||||
// CHECK-FPDP-DAG: "-target-feature" "+fullfp16"
|
||||
// CHECK-FPDP-DAG: "-target-feature" "+fp64"
|
||||
// CHECK-FPDP-NOT: "-target-feature" "+d32"
|
||||
|
||||
// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+nofp.dp -### %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-NOFPDP < %t %s
|
||||
// CHECK-NOFPDP: "-target-feature" "-fp64"
|
||||
// CHECK-NOFPDP-DAG: "-target-feature" "-fp64"
|
||||
|
||||
// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve -### %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-MVE < %t %s
|
||||
// CHECK-MVE: "-target-feature" "+mve"
|
||||
// CHECK-MVE-DAG: "-target-feature" "+mve"
|
||||
|
||||
// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+nomve -### %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-NOMVE < %t %s
|
||||
// CHECK-NOMVE: "-target-feature" "-mve"
|
||||
// CHECK-NOMVE-DAG: "-target-feature" "-mve"
|
||||
|
||||
// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp -### %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-MVEFP < %t %s
|
||||
// CHECK-MVEFP: "-target-feature" "+mve.fp"
|
||||
// CHECK-MVEFP-DAG: "-target-feature" "+mve.fp"
|
||||
// CHECK-MVEFP-NOT: "-target-feature" "+fp64"
|
||||
|
||||
// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+nomve.fp -### %s 2> %t
|
||||
|
@ -43,7 +56,7 @@
|
|||
|
||||
// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp+fp.dp -### %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-MVEFP_DP < %t %s
|
||||
// CHECK-MVEFP_DP: "-target-feature" "+mve.fp"
|
||||
// CHECK-MVEFP_DP: "-target-feature" "+fp64"
|
||||
// CHECK-MVEFP_DP-DAG: "-target-feature" "+mve.fp"
|
||||
// CHECK-MVEFP_DP-DAG: "-target-feature" "+fp64"
|
||||
|
||||
double foo (double a) { return a; }
|
||||
|
|
|
@ -57,8 +57,11 @@
|
|||
// RUN: %clang -target armv7r-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA
|
||||
// RUN: %clang -target armv7r-eabi -mfpu=vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA
|
||||
// RUN: %clang -target armv7em-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA
|
||||
// RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA
|
||||
|
||||
// (armv8 defaults to fp-armv8 > vfpv4, so we *should* expect FMA unless we downgrade to pre-vfpv4)
|
||||
// RUN: %clang -target armv8-eabi -mfpu=vfpv3 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA
|
||||
// RUN: %clang -target armv8-eabi -mfpu=vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA
|
||||
// RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA
|
||||
|
||||
// CHECK-FMA: __ARM_FEATURE_FMA 1
|
||||
|
||||
|
|
|
@ -776,3 +776,6 @@
|
|||
// CHECK-V85A: #define __ARM_ARCH 8
|
||||
// CHECK-V85A: #define __ARM_ARCH_8_5A__ 1
|
||||
// CHECK-V85A: #define __ARM_ARCH_PROFILE 'A'
|
||||
|
||||
// RUN: %clang -target arm-none-none-eabi -march=armv7-m -mfpu=softvfp -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SOFTVFP %s
|
||||
// CHECK-SOFTVFP-NOT: #define __ARM_FP 0x
|
||||
|
|
|
@ -162,87 +162,63 @@ bool ARM::getFPUFeatures(unsigned FPUKind, std::vector<StringRef> &Features) {
|
|||
if (FPUKind >= FK_LAST || FPUKind == FK_INVALID)
|
||||
return false;
|
||||
|
||||
// FPU version subtarget features are inclusive of lower-numbered ones, so
|
||||
// enable the one corresponding to this version and disable all that are
|
||||
// higher. We also have to make sure to disable fp16 when vfp4 is disabled,
|
||||
// as +vfp4 implies +fp16 but -vfp4 does not imply -fp16.
|
||||
switch (FPUNames[FPUKind].FPUVer) {
|
||||
case FPUVersion::VFPV5_FULLFP16:
|
||||
Features.push_back("+fp-armv8");
|
||||
Features.push_back("+fullfp16");
|
||||
break;
|
||||
case FPUVersion::VFPV5:
|
||||
Features.push_back("+fp-armv8");
|
||||
break;
|
||||
case FPUVersion::VFPV4:
|
||||
Features.push_back("+vfp4");
|
||||
Features.push_back("-fp-armv8");
|
||||
break;
|
||||
case FPUVersion::VFPV3_FP16:
|
||||
Features.push_back("+vfp3");
|
||||
Features.push_back("+fp16");
|
||||
Features.push_back("-vfp4");
|
||||
Features.push_back("-fp-armv8");
|
||||
break;
|
||||
case FPUVersion::VFPV3:
|
||||
Features.push_back("+vfp3");
|
||||
Features.push_back("-fp16");
|
||||
Features.push_back("-vfp4");
|
||||
Features.push_back("-fp-armv8");
|
||||
break;
|
||||
case FPUVersion::VFPV2:
|
||||
Features.push_back("+vfp2");
|
||||
Features.push_back("-vfp3");
|
||||
Features.push_back("-fp16");
|
||||
Features.push_back("-vfp4");
|
||||
Features.push_back("-fp-armv8");
|
||||
break;
|
||||
case FPUVersion::NONE:
|
||||
Features.push_back("-fpregs");
|
||||
Features.push_back("-vfp2");
|
||||
Features.push_back("-vfp3");
|
||||
Features.push_back("-fp16");
|
||||
Features.push_back("-vfp4");
|
||||
Features.push_back("-fp-armv8");
|
||||
break;
|
||||
static const struct FPUFeatureNameInfo {
|
||||
const char *PlusName, *MinusName;
|
||||
FPUVersion MinVersion;
|
||||
FPURestriction MaxRestriction;
|
||||
} FPUFeatureInfoList[] = {
|
||||
// We have to specify the + and - versions of the name in full so
|
||||
// that we can return them as static StringRefs.
|
||||
//
|
||||
// Also, the SubtargetFeatures ending in just "sp" are listed here
|
||||
// under FPURestriction::None, which is the only FPURestriction in
|
||||
// which they would be valid (since FPURestriction::SP doesn't
|
||||
// exist).
|
||||
|
||||
{"+fpregs", "-fpregs", FPUVersion::VFPV2, FPURestriction::SP_D16},
|
||||
{"+vfp2", "-vfp2", FPUVersion::VFPV2, FPURestriction::None},
|
||||
{"+vfp2d16", "-vfp2d16", FPUVersion::VFPV2, FPURestriction::D16},
|
||||
{"+vfp2d16sp", "-vfp2d16sp", FPUVersion::VFPV2, FPURestriction::SP_D16},
|
||||
{"+vfp2sp", "-vfp2sp", FPUVersion::VFPV2, FPURestriction::None},
|
||||
{"+vfp3", "-vfp3", FPUVersion::VFPV3, FPURestriction::None},
|
||||
{"+vfp3d16", "-vfp3d16", FPUVersion::VFPV3, FPURestriction::D16},
|
||||
{"+vfp3d16sp", "-vfp3d16sp", FPUVersion::VFPV3, FPURestriction::SP_D16},
|
||||
{"+vfp3sp", "-vfp3sp", FPUVersion::VFPV3, FPURestriction::None},
|
||||
{"+fp16", "-fp16", FPUVersion::VFPV3_FP16, FPURestriction::SP_D16},
|
||||
{"+vfp4", "-vfp4", FPUVersion::VFPV4, FPURestriction::None},
|
||||
{"+vfp4d16", "-vfp4d16", FPUVersion::VFPV4, FPURestriction::D16},
|
||||
{"+vfp4d16sp", "-vfp4d16sp", FPUVersion::VFPV4, FPURestriction::SP_D16},
|
||||
{"+vfp4sp", "-vfp4sp", FPUVersion::VFPV4, FPURestriction::None},
|
||||
{"+fp-armv8", "-fp-armv8", FPUVersion::VFPV5, FPURestriction::None},
|
||||
{"+fp-armv8d16", "-fp-armv8d16", FPUVersion::VFPV5, FPURestriction::D16},
|
||||
{"+fp-armv8d16sp", "-fp-armv8d16sp", FPUVersion::VFPV5, FPURestriction::SP_D16},
|
||||
{"+fp-armv8sp", "-fp-armv8sp", FPUVersion::VFPV5, FPURestriction::None},
|
||||
{"+fullfp16", "-fullfp16", FPUVersion::VFPV5_FULLFP16, FPURestriction::SP_D16},
|
||||
{"+fp64", "-fp64", FPUVersion::VFPV2, FPURestriction::D16},
|
||||
{"+d32", "-d32", FPUVersion::VFPV2, FPURestriction::None},
|
||||
};
|
||||
|
||||
for (const auto &Info: FPUFeatureInfoList) {
|
||||
if (FPUNames[FPUKind].FPUVer >= Info.MinVersion &&
|
||||
FPUNames[FPUKind].Restriction <= Info.MaxRestriction)
|
||||
Features.push_back(Info.PlusName);
|
||||
else
|
||||
Features.push_back(Info.MinusName);
|
||||
}
|
||||
|
||||
// fp64 and d32 subtarget features are independent of each other, so we
|
||||
// must disable/enable both.
|
||||
if (FPUKind == FK_NONE) {
|
||||
Features.push_back("-fp64");
|
||||
Features.push_back("-d32");
|
||||
} else {
|
||||
switch (FPUNames[FPUKind].Restriction) {
|
||||
case FPURestriction::SP_D16:
|
||||
Features.push_back("-fp64");
|
||||
Features.push_back("-d32");
|
||||
break;
|
||||
case FPURestriction::D16:
|
||||
Features.push_back("+fp64");
|
||||
Features.push_back("-d32");
|
||||
break;
|
||||
case FPURestriction::None:
|
||||
Features.push_back("+fp64");
|
||||
Features.push_back("+d32");
|
||||
break;
|
||||
}
|
||||
}
|
||||
static const struct NeonFeatureNameInfo {
|
||||
const char *PlusName, *MinusName;
|
||||
NeonSupportLevel MinSupportLevel;
|
||||
} NeonFeatureInfoList[] = {
|
||||
{"+neon", "-neon", NeonSupportLevel::Neon},
|
||||
{"+crypto", "-crypto", NeonSupportLevel::Crypto},
|
||||
};
|
||||
|
||||
// crypto includes neon, so we handle this similarly to FPU version.
|
||||
switch (FPUNames[FPUKind].NeonSupport) {
|
||||
case NeonSupportLevel::Crypto:
|
||||
Features.push_back("+neon");
|
||||
Features.push_back("+crypto");
|
||||
break;
|
||||
case NeonSupportLevel::Neon:
|
||||
Features.push_back("+neon");
|
||||
Features.push_back("-crypto");
|
||||
break;
|
||||
case NeonSupportLevel::None:
|
||||
Features.push_back("-neon");
|
||||
Features.push_back("-crypto");
|
||||
break;
|
||||
for (const auto &Info: NeonFeatureInfoList) {
|
||||
if (FPUNames[FPUKind].NeonSupport >= Info.MinSupportLevel)
|
||||
Features.push_back(Info.PlusName);
|
||||
else
|
||||
Features.push_back(Info.MinusName);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue