Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8907b775 authored by arter97's avatar arter97 Committed by Steve Kondik
Browse files

Apply correct, optimized mfpu compiler flag for ARMv7-A Cortex CPUs

For those ARMv7-A Cortex CPUs that can handle VFPv4 floating point,
We can set "-mfpu=neon-vfpv4" instead of generic "-mfpu=neon"
to gain extra performance improvements.

References :
 - GCC		: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
 - Cortex A15	: http://www.arm.com/products/processors/cortex-a/cortex-a15.php
 - Cortex A9	: http://www.arm.com/products/processors/cortex-a/cortex-a9.php
 - Cortex A8	: http://www.arm.com/products/processors/cortex-a/cortex-a8.php
 - Cortex A7	: http://www.arm.com/products/processors/cortex-a/cortex-a7.php
 - Cortex A5	: http://www.arm.com/products/processors/cortex-a/cortex-a5.php



Change-Id: Id8b1a251234014ecf7ffbc1ae14455ed1726e028
Signed-off-by: default avatarPark Ju Hyung <qkrwngud825@gmail.com>
parent 50d46bbc
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -7,24 +7,24 @@ ARCH_ARM_HAVE_VFP_D32 := true
ARCH_ARM_HAVE_NEON              := true

ifeq ($(TARGET_CPU_VARIANT),$(filter $(TARGET_CPU_VARIANT),cortex-a15 krait))
	arch_variant_cflags := -mcpu=cortex-a15
	arch_variant_cflags := -mcpu=cortex-a15 -mfpu=neon-vfpv4
else
ifeq ($(strip $(TARGET_CPU_VARIANT)),cortex-a9)
	arch_variant_cflags := -mcpu=cortex-a9
	arch_variant_cflags := -mcpu=cortex-a9 -mfpu=neon
else
ifeq ($(strip $(TARGET_CPU_VARIANT)),cortex-a8)
	arch_variant_cflags := -mcpu=cortex-a8
	arch_variant_cflags := -mcpu=cortex-a8 -mfpu=neon
else
ifeq ($(strip $(TARGET_CPU_VARIANT)),cortex-a7)
	arch_variant_cflags := -mcpu=cortex-a7
	arch_variant_cflags := -mcpu=cortex-a7 -mfpu=neon-vfpv4
else
ifeq ($(strip $(TARGET_CPU_VARIANT)),cortex-a5)
	arch_variant_cflags := -mcpu=cortex-a5
	arch_variant_cflags := -mcpu=cortex-a5 -mfpu=neon-vfpv4
else
ifeq ($(strip $(TARGET_CPU_VARIANT)),scorpion)
	arch_variant_cflags := -mcpu=cortex-a8
	arch_variant_cflags := -mcpu=cortex-a8 -mfpu=neon
else
	arch_variant_cflags := -march=armv7-a
	arch_variant_cflags := -march=armv7-a -mfpu=neon
endif
endif
endif
@@ -33,8 +33,7 @@ endif
endif

arch_variant_cflags += \
    -mfloat-abi=softfp \
    -mfpu=neon
    -mfloat-abi=softfp

arch_variant_ldflags := \
	-Wl,--fix-cortex-a8