mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[AArch64, ARM] Add support for Samsung Exynos M4
Create a separate feature set for Exynos M4 and add test cases. llvm-svn: 334115
This commit is contained in:
parent
28a6e1c4ce
commit
5e33852f89
@ -82,6 +82,8 @@ AARCH64_CPU_NAME("exynos-m2", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
(AArch64::AEK_CRC))
|
||||
AARCH64_CPU_NAME("exynos-m3", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
(AArch64::AEK_CRC))
|
||||
AARCH64_CPU_NAME("exynos-m4", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
(AArch64::AEK_CRC))
|
||||
AARCH64_CPU_NAME("falkor", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
(AArch64::AEK_CRC | AArch64::AEK_RDM))
|
||||
AARCH64_CPU_NAME("saphira", ARMV8_3A, FK_CRYPTO_NEON_FP_ARMV8, false,
|
||||
|
@ -253,6 +253,7 @@ ARM_CPU_NAME("cyclone", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
|
||||
ARM_CPU_NAME("exynos-m1", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
|
||||
ARM_CPU_NAME("exynos-m2", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
|
||||
ARM_CPU_NAME("exynos-m3", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
|
||||
ARM_CPU_NAME("exynos-m4", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
|
||||
ARM_CPU_NAME("kryo", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
|
||||
// Non-standard Arch names.
|
||||
ARM_CPU_NAME("iwmmxt", IWMMXT, FK_NONE, true, ARM::AEK_NONE)
|
||||
|
@ -487,6 +487,7 @@ def : ProcessorModel<"cyclone", CycloneModel, [ProcCyclone]>;
|
||||
def : ProcessorModel<"exynos-m1", ExynosM1Model, [ProcExynosM1]>;
|
||||
def : ProcessorModel<"exynos-m2", ExynosM1Model, [ProcExynosM2]>;
|
||||
def : ProcessorModel<"exynos-m3", ExynosM3Model, [ProcExynosM3]>;
|
||||
def : ProcessorModel<"exynos-m4", ExynosM3Model, [ProcExynosM3]>;
|
||||
def : ProcessorModel<"falkor", FalkorModel, [ProcFalkor]>;
|
||||
def : ProcessorModel<"saphira", FalkorModel, [ProcSaphira]>;
|
||||
def : ProcessorModel<"kryo", KryoModel, [ProcKryo]>;
|
||||
|
@ -992,6 +992,12 @@ def : ProcNoItin<"exynos-m3", [ARMv8a, ProcExynosM1,
|
||||
FeatureCrypto,
|
||||
FeatureCRC]>;
|
||||
|
||||
def : ProcNoItin<"exynos-m4", [ARMv8a, ProcExynosM1,
|
||||
FeatureHWDivThumb,
|
||||
FeatureHWDivARM,
|
||||
FeatureCrypto,
|
||||
FeatureCRC]>;
|
||||
|
||||
def : ProcNoItin<"kryo", [ARMv8a, ProcKryo,
|
||||
FeatureHWDivThumb,
|
||||
FeatureHWDivARM,
|
||||
|
@ -12,6 +12,7 @@
|
||||
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m1 2>&1 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m2 2>&1 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m3 2>&1 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m4 2>&1 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=falkor 2>&1 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=saphira 2>&1 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=kryo 2>&1 | FileCheck %s
|
||||
|
@ -1,5 +1,6 @@
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mattr=fuse-address | FileCheck %s
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m3 | FileCheck %s
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m4 | FileCheck %s
|
||||
|
||||
target triple = "aarch64-unknown"
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m1 | FileCheck %s
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m2 | FileCheck %s
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m3 | FileCheck %s
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m4 | FileCheck %s
|
||||
|
||||
declare <16 x i8> @llvm.aarch64.crypto.aese(<16 x i8> %d, <16 x i8> %k)
|
||||
declare <16 x i8> @llvm.aarch64.crypto.aesmc(<16 x i8> %d)
|
||||
|
@ -1,5 +1,6 @@
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mattr=fuse-csel | FileCheck %s
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m3 | FileCheck %s
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m4 | FileCheck %s
|
||||
|
||||
target triple = "aarch64-unknown"
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mattr=+fuse-literals | FileCheck %s --check-prefix=CHECK --check-prefix=CHECKFUSE
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=cortex-a57 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECKFUSE
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m3 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECKFUSE
|
||||
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m4 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECKFUSE
|
||||
|
||||
@g = common local_unnamed_addr global i8* null, align 8
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m1 -o - %s | FileCheck %s
|
||||
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m2 -o - %s | FileCheck %s
|
||||
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m3 -o - %s | FileCheck %s
|
||||
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m4 -o - %s | FileCheck %s
|
||||
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=falkor -o - %s | FileCheck %s
|
||||
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=saphira -o - %s | FileCheck %s
|
||||
; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=kryo -o - %s | FileCheck %s
|
||||
|
@ -143,6 +143,9 @@
|
||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m3 | FileCheck %s --check-prefix=EXYNOS-M3
|
||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m3 -enable-unsafe-fp-math -disable-fp-elim -enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast | FileCheck %s --check-prefix=EXYNOS-M1-FAST
|
||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m3 -enable-sign-dependent-rounding-fp-math | FileCheck %s --check-prefix=DYN-ROUNDING
|
||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m4 | FileCheck %s --check-prefix=EXYNOS-M4
|
||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m4 -enable-unsafe-fp-math -disable-fp-elim -enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast | FileCheck %s --check-prefix=EXYNOS-M1-FAST
|
||||
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mcpu=exynos-m4 -enable-sign-dependent-rounding-fp-math | FileCheck %s --check-prefix=DYN-ROUNDING
|
||||
; RUN: llc < %s -mtriple=armv8.1a-linux-gnueabi -enable-unsafe-fp-math -disable-fp-elim -enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast | FileCheck %s --check-prefix=GENERIC-ARMV8_1-A-FAST
|
||||
; RUN: llc < %s -mtriple=armv8.1a-linux-gnueabi -enable-sign-dependent-rounding-fp-math | FileCheck %s --check-prefix=DYN-ROUNDING
|
||||
; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mcpu=cortex-a7 | FileCheck %s --check-prefix=CORTEX-A7-CHECK
|
||||
@ -182,6 +185,8 @@
|
||||
; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m2 -mattr=+strict-align | FileCheck %s --check-prefix=STRICT-ALIGN
|
||||
; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m3 | FileCheck %s --check-prefix=NO-STRICT-ALIGN
|
||||
; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m3 -mattr=+strict-align | FileCheck %s --check-prefix=STRICT-ALIGN
|
||||
; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m4 | FileCheck %s --check-prefix=NO-STRICT-ALIGN
|
||||
; RUN: llc < %s -mtriple=armv8-none-linux-gnueabi -mcpu=exynos-m4 -mattr=+strict-align | FileCheck %s --check-prefix=STRICT-ALIGN
|
||||
|
||||
; ARMv7a
|
||||
; RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mcpu=cortex-a7 | FileCheck %s --check-prefix=NO-STRICT-ALIGN
|
||||
@ -1613,6 +1618,29 @@
|
||||
; EXYNOS-M3-NOT: .eabi_attribute 28
|
||||
; EXYNOS-M3: .eabi_attribute 38, 1
|
||||
|
||||
; EXYNOS-M4: .cpu exynos-m4
|
||||
; EXYNOS-M4: .eabi_attribute 6, 14
|
||||
; EXYNOS-M4: .eabi_attribute 7, 65
|
||||
; EXYNOS-M4: .eabi_attribute 8, 1
|
||||
; EXYNOS-M4: .eabi_attribute 9, 2
|
||||
; EXYNOS-M4: .fpu crypto-neon-fp-armv8
|
||||
; EXYNOS-M4: .eabi_attribute 12, 3
|
||||
; EXYNOS-M4-NOT: .eabi_attribute 27
|
||||
; EXYNOS-M4: .eabi_attribute 36, 1
|
||||
; EXYNOS-M4: .eabi_attribute 42, 1
|
||||
; EXYNOS-M4-NOT: .eabi_attribute 44
|
||||
; EXYNOS-M4: .eabi_attribute 68, 3
|
||||
; EXYNOS-M4-NOT: .eabi_attribute 19
|
||||
;; We default to IEEE 754 compliance
|
||||
; EXYNOS-M4: .eabi_attribute 20, 1
|
||||
; EXYNOS-M4: .eabi_attribute 21, 1
|
||||
; EXYNOS-M4-NOT: .eabi_attribute 22
|
||||
; EXYNOS-M4: .eabi_attribute 23, 3
|
||||
; EXYNOS-M4: .eabi_attribute 24, 1
|
||||
; EXYNOS-M4: .eabi_attribute 25, 1
|
||||
; EXYNOS-M4-NOT: .eabi_attribute 28
|
||||
; EXYNOS-M4: .eabi_attribute 38, 1
|
||||
|
||||
; GENERIC-FPU-VFPV3-FP16: .fpu vfpv3-fp16
|
||||
; GENERIC-FPU-VFPV3-D16-FP16: .fpu vfpv3-d16-fp16
|
||||
; GENERIC-FPU-VFPV3XD: .fpu vfpv3xd
|
||||
|
@ -253,18 +253,23 @@ TEST(TargetParserTest, testARMCPU) {
|
||||
"8-A"));
|
||||
EXPECT_TRUE(testARMCPU("exynos-m1", "armv8-a", "crypto-neon-fp-armv8",
|
||||
ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
|
||||
ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
|
||||
ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
|
||||
ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
|
||||
ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
|
||||
"8-A"));
|
||||
EXPECT_TRUE(testARMCPU("exynos-m2", "armv8-a", "crypto-neon-fp-armv8",
|
||||
ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
|
||||
ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
|
||||
ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
|
||||
ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
|
||||
ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
|
||||
"8-A"));
|
||||
EXPECT_TRUE(testARMCPU("exynos-m3", "armv8-a", "crypto-neon-fp-armv8",
|
||||
ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
|
||||
ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
|
||||
ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
|
||||
ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
|
||||
ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
|
||||
"8-A"));
|
||||
EXPECT_TRUE(testARMCPU("exynos-m4", "armv8-a", "crypto-neon-fp-armv8",
|
||||
ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP |
|
||||
ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
|
||||
ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP,
|
||||
"8-A"));
|
||||
EXPECT_TRUE(testARMCPU("cortex-m23", "armv8-m.base", "none",
|
||||
ARM::AEK_HWDIVTHUMB, "8-M.Baseline"));
|
||||
@ -279,7 +284,7 @@ TEST(TargetParserTest, testARMCPU) {
|
||||
"7-S"));
|
||||
}
|
||||
|
||||
static constexpr unsigned NumARMCPUArchs = 82;
|
||||
static constexpr unsigned NumARMCPUArchs = 83;
|
||||
|
||||
TEST(TargetParserTest, testARMCPUArchList) {
|
||||
SmallVector<StringRef, NumARMCPUArchs> List;
|
||||
@ -727,6 +732,10 @@ TEST(TargetParserTest, testAArch64CPU) {
|
||||
"exynos-m3", "armv8-a", "crypto-neon-fp-armv8",
|
||||
AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
|
||||
AArch64::AEK_SIMD, "8-A"));
|
||||
EXPECT_TRUE(testAArch64CPU(
|
||||
"exynos-m4", "armv8-a", "crypto-neon-fp-armv8",
|
||||
AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
|
||||
AArch64::AEK_SIMD, "8-A"));
|
||||
EXPECT_TRUE(testAArch64CPU(
|
||||
"falkor", "armv8-a", "crypto-neon-fp-armv8",
|
||||
AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
|
||||
@ -761,7 +770,7 @@ TEST(TargetParserTest, testAArch64CPU) {
|
||||
"8-A"));
|
||||
}
|
||||
|
||||
static constexpr unsigned NumAArch64CPUArchs = 19;
|
||||
static constexpr unsigned NumAArch64CPUArchs = 20;
|
||||
|
||||
TEST(TargetParserTest, testAArch64CPUArchList) {
|
||||
SmallVector<StringRef, NumAArch64CPUArchs> List;
|
||||
@ -824,6 +833,8 @@ TEST(TargetParserTest, testAArch64Extension) {
|
||||
AArch64::ArchKind::INVALID, "ras"));
|
||||
EXPECT_FALSE(testAArch64Extension("exynos-m3",
|
||||
AArch64::ArchKind::INVALID, "ras"));
|
||||
EXPECT_FALSE(testAArch64Extension("exynos-m4",
|
||||
AArch64::ArchKind::INVALID, "ras"));
|
||||
EXPECT_TRUE(testAArch64Extension("falkor",
|
||||
AArch64::ArchKind::INVALID, "rdm"));
|
||||
EXPECT_FALSE(testAArch64Extension("kryo",
|
||||
|
Loading…
x
Reference in New Issue
Block a user