From de7c7847e7e028d46fdff8268689f30163c4c231 Mon Sep 17 00:00:00 2001 From: Jesus Sanchez-Palencia Date: Thu, 2 Mar 2023 16:56:05 -0800 Subject: [PATCH] soong: Add Cortex-A32 definitions Add definitions for the Cortex-A32 CPU. This is an aarch32 only ARMv8-A core. See more here https://developer.arm.com/Processors/Cortex-A32 . Test: added new minidroid target using this CPU variant and built Change-Id: Id2351a43b9c6cb9785ef469b8c13fadd8b6324b8 Signed-off-by: Mark Slevinsky Signed-off-by: Jesus Sanchez-Palencia --- android/arch_list.go | 1 + cc/config/arm_device.go | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/android/arch_list.go b/android/arch_list.go index 578904cfe..97bbc6351 100644 --- a/android/arch_list.go +++ b/android/arch_list.go @@ -71,6 +71,7 @@ var cpuVariants = map[ArchType][]string{ "cortex-a8", "cortex-a9", "cortex-a15", + "cortex-a32", "cortex-a53", "cortex-a53.a57", "cortex-a55", diff --git a/cc/config/arm_device.go b/cc/config/arm_device.go index 981d1eaa6..070455021 100644 --- a/cc/config/arm_device.go +++ b/cc/config/arm_device.go @@ -97,6 +97,15 @@ var ( // better solution comes around. See Bug 27340895 "-D__ARM_FEATURE_LPAE=1", }, + "cortex-a32": []string{ + "-mcpu=cortex-a32", + "-mfpu=neon-vfpv4", + // Fake an ARM compiler flag as these processors support LPAE which clang + // don't advertise. + // TODO This is a hack and we need to add it for each processor that supports LPAE until some + // better solution comes around. See Bug 27340895 + "-D__ARM_FEATURE_LPAE=1", + }, "cortex-a53": []string{ "-mcpu=cortex-a53", "-mfpu=neon-fp-armv8", @@ -204,6 +213,7 @@ func init() { exportedVars.ExportStringListStaticVariable("ArmCortexA7Cflags", armCpuVariantCflags["cortex-a7"]) exportedVars.ExportStringListStaticVariable("ArmCortexA8Cflags", armCpuVariantCflags["cortex-a8"]) exportedVars.ExportStringListStaticVariable("ArmCortexA15Cflags", armCpuVariantCflags["cortex-a15"]) + exportedVars.ExportStringListStaticVariable("ArmCortexA32Cflags", armCpuVariantCflags["cortex-a32"]) exportedVars.ExportStringListStaticVariable("ArmCortexA53Cflags", armCpuVariantCflags["cortex-a53"]) exportedVars.ExportStringListStaticVariable("ArmCortexA55Cflags", armCpuVariantCflags["cortex-a55"]) exportedVars.ExportStringListStaticVariable("ArmKraitCflags", armCpuVariantCflags["krait"]) @@ -224,6 +234,7 @@ var ( "cortex-a8": "${config.ArmCortexA8Cflags}", "cortex-a9": "${config.ArmGenericCflags}", "cortex-a15": "${config.ArmCortexA15Cflags}", + "cortex-a32": "${config.ArmCortexA32Cflags}", "cortex-a53": "${config.ArmCortexA53Cflags}", "cortex-a53.a57": "${config.ArmCortexA53Cflags}", "cortex-a55": "${config.ArmCortexA55Cflags}",