[arch][arm/arm64] Define make variables to enable use of optional simd instructions.

Support for these instructions can be detected at runtime, but then the unused
code cannot be eliminated at build time.

Change-Id: I51fae84fe4dfb5c9741d732f1f04ac765339175a
This commit is contained in:
Arve Hjønnevåg
2015-09-21 17:22:50 -07:00
parent f12796e834
commit 8b55dedf4c
2 changed files with 16 additions and 0 deletions

View File

@@ -208,6 +208,13 @@ ifneq ($(ARM_WITHOUT_VFP_NEON),true)
GLOBAL_DEFINES += \
ARM_WITH_VFP=1 \
ARM_WITH_NEON=1
# Enable optional instructions unless platform already disabled them
USE_ARM_V7_NEON ?= true
USE_ARM_V8_AES ?= true
USE_ARM_V8_PMULL ?= true
USE_ARM_V8_SHA1 ?= true
USE_ARM_V8_SHA2 ?= true
endif
HANDLED_CORE := true
endif

View File

@@ -46,6 +46,15 @@ GLOBAL_DEFINES += \
SMP_MAX_CPUS=1
endif
ifeq (false,$(call TOBOOL,$(ARM_WITHOUT_VFP_NEON)))
# Enable optional instructions unless platform already disabled them
USE_ARM_V7_NEON ?= true
USE_ARM_V8_AES ?= true
USE_ARM_V8_PMULL ?= true
USE_ARM_V8_SHA1 ?= true
USE_ARM_V8_SHA2 ?= true
endif
ARCH_OPTFLAGS := -O2
# we have a mmu and want the vmm/pmm