1//===- AARCH64TargetParser.def - AARCH64 target parsing defines ---------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file provides defines to build up the AARCH64 target parser's logic. 11// 12//===----------------------------------------------------------------------===// 13 14// NOTE: NO INCLUDE GUARD DESIRED! 15 16#ifndef AARCH64_ARCH 17#define AARCH64_ARCH(NAME, ID, CPU_ATTR, SUB_ARCH, ARCH_ATTR, ARCH_FPU, ARCH_BASE_EXT) 18#endif 19AARCH64_ARCH("armv8-a", AK_ARMV8A, "8-A", "v8", ARMBuildAttrs::CPUArch::v8_A, 20 FK_CRYPTO_NEON_FP_ARMV8, 21 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP | 22 AArch64::AEK_SIMD | AArch64::AEK_FP16 | AArch64::AEK_PROFILE)) 23AARCH64_ARCH("armv8.1-a", AK_ARMV8_1A, "8.1-A", "v8.1a", 24 ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8, 25 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP | 26 AArch64::AEK_SIMD | AArch64::AEK_FP16 | AArch64::AEK_PROFILE)) 27AARCH64_ARCH("armv8.2-a", AK_ARMV8_2A, "8.2-A", "v8.2a", 28 ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8, 29 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP | 30 AArch64::AEK_SIMD | AArch64::AEK_FP16 | AArch64::AEK_PROFILE | 31 AArch64::AEK_RAS)) 32#undef AARCH64_ARCH 33 34#ifndef AARCH64_ARCH_EXT_NAME 35#define AARCH64_ARCH_EXT_NAME(NAME, ID, FEATURE, NEGFEATURE) 36#endif 37// FIXME: This would be nicer were it tablegen 38AARCH64_ARCH_EXT_NAME("invalid", AArch64::AEK_INVALID, nullptr, nullptr) 39AARCH64_ARCH_EXT_NAME("none", AArch64::AEK_NONE, nullptr, nullptr) 40AARCH64_ARCH_EXT_NAME("crc", AArch64::AEK_CRC, "+crc", "-crc") 41AARCH64_ARCH_EXT_NAME("crypto", AArch64::AEK_CRYPTO, "+crypto","-crypto") 42AARCH64_ARCH_EXT_NAME("fp", AArch64::AEK_FP, "+fp-armv8", "-fp-armv8") 43AARCH64_ARCH_EXT_NAME("simd", AArch64::AEK_SIMD, "+neon", "-neon") 44AARCH64_ARCH_EXT_NAME("fp16", AArch64::AEK_FP16, "+fullfp16", "-fullfp16") 45AARCH64_ARCH_EXT_NAME("profile", AArch64::AEK_PROFILE, "+spe", "-spe") 46AARCH64_ARCH_EXT_NAME("ras", AArch64::AEK_RAS, "+ras", "-ras") 47#undef AARCH64_ARCH_EXT_NAME 48 49#ifndef AARCH64_CPU_NAME 50#define AARCH64_CPU_NAME(NAME, ID, DEFAULT_FPU, IS_DEFAULT, DEFAULT_EXT) 51#endif 52AARCH64_CPU_NAME("cortex-a35", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, 53 (AArch64::AEK_SIMD | AArch64::AEK_CRC | AArch64::AEK_CRYPTO)) 54AARCH64_CPU_NAME("cortex-a53", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, true, 55 ( AArch64::AEK_SIMD | AArch64::AEK_CRC | AArch64::AEK_CRYPTO)) 56AARCH64_CPU_NAME("cortex-a57", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, 57 (AArch64::AEK_SIMD | AArch64::AEK_CRC | AArch64::AEK_CRYPTO)) 58AARCH64_CPU_NAME("cortex-a72", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, 59 (AArch64::AEK_SIMD | AArch64::AEK_CRC | AArch64::AEK_CRYPTO)) 60AARCH64_CPU_NAME("cortex-a73", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, 61 (AArch64::AEK_SIMD | AArch64::AEK_CRC | AArch64::AEK_CRYPTO)) 62AARCH64_CPU_NAME("cyclone", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, 63 (AArch64::AEK_SIMD | AArch64::AEK_CRYPTO)) 64AARCH64_CPU_NAME("exynos-m1", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, 65 (AArch64::AEK_SIMD | AArch64::AEK_CRC | AArch64::AEK_CRYPTO)) 66AARCH64_CPU_NAME("kryo", AK_ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, 67 (AArch64::AEK_SIMD | AArch64::AEK_CRC | AArch64::AEK_CRYPTO)) 68AARCH64_CPU_NAME("vulcan", AK_ARMV8_1A, FK_CRYPTO_NEON_FP_ARMV8, false, 69 (AArch64::AEK_SIMD | AArch64::AEK_CRC | AArch64::AEK_CRYPTO)) 70// Invalid CPU 71AARCH64_CPU_NAME("invalid", AK_INVALID, FK_INVALID, true, AArch64::AEK_INVALID) 72#undef AARCH64_CPU_NAME 73