mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-05 04:38:37 +00:00
AArch64: set all processor features from -arch if nothing else present
Darwin's "-arch arm64" option implies full Cyclone CPU, for both architectural and tuning purposes. So if neither of the explicit options have been given, forward that on to the proper invocation. rdar://problem/18906227 llvm-svn: 221631
This commit is contained in:
parent
99c464c3f3
commit
642e770f68
@ -1794,6 +1794,9 @@ static void getAArch64TargetFeatures(const Driver &D, const ArgList &Args,
|
||||
success = getAArch64ArchFeaturesFromMarch(D, A->getValue(), Args, Features);
|
||||
else if ((A = Args.getLastArg(options::OPT_mcpu_EQ)))
|
||||
success = getAArch64ArchFeaturesFromMcpu(D, A->getValue(), Args, Features);
|
||||
else if (Args.hasArg(options::OPT_arch))
|
||||
success = getAArch64ArchFeaturesFromMcpu(D, getAArch64TargetCPU(Args), Args,
|
||||
Features);
|
||||
|
||||
if (success && (A = Args.getLastArg(options::OPT_mtune_EQ)))
|
||||
success =
|
||||
@ -1801,6 +1804,9 @@ static void getAArch64TargetFeatures(const Driver &D, const ArgList &Args,
|
||||
else if (success && (A = Args.getLastArg(options::OPT_mcpu_EQ)))
|
||||
success =
|
||||
getAArch64MicroArchFeaturesFromMcpu(D, A->getValue(), Args, Features);
|
||||
else if (Args.hasArg(options::OPT_arch))
|
||||
success = getAArch64MicroArchFeaturesFromMcpu(D, getAArch64TargetCPU(Args),
|
||||
Args, Features);
|
||||
|
||||
if (!success)
|
||||
D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args);
|
||||
|
@ -73,6 +73,9 @@
|
||||
// CHECK-MCPU-A53: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto"
|
||||
// CHECK-MCPU-A57: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto"
|
||||
|
||||
// RUN: %clang -target x86_64-apple-macosx -arch arm64 -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH-ARM64 %s
|
||||
// CHECK-ARCH-ARM64: "-target-cpu" "cyclone" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" "-target-feature" "+zcm" "-target-feature" "+zcz"
|
||||
|
||||
// RUN: %clang -target aarch64 -march=armv8-a+fp+simd+crc+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-1 %s
|
||||
// RUN: %clang -target aarch64 -march=armv8-a+nofp+nosimd+nocrc+nocrypto+fp+simd+crc+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-1 %s
|
||||
// RUN: %clang -target aarch64 -march=armv8-a+nofp+nosimd+nocrc+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-2 %s
|
||||
|
Loading…
Reference in New Issue
Block a user