summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2014-05-07 11:01:31 -0700
committerJohann <johannkoenig@google.com>2014-05-12 08:52:02 -0700
commitce23931a3f21b1eaf5682d83b8a335a751bf4950 (patch)
tree1ce963173a305b2b4edd93af1b1da9784b9265cc /build
parent3305909bc2e2d6d9bfe8c01a3fe2324569c84215 (diff)
downloadlibvpx-ce23931a3f21b1eaf5682d83b8a335a751bf4950.tar
libvpx-ce23931a3f21b1eaf5682d83b8a335a751bf4950.tar.gz
libvpx-ce23931a3f21b1eaf5682d83b8a335a751bf4950.tar.bz2
libvpx-ce23931a3f21b1eaf5682d83b8a335a751bf4950.zip
Only build neon assembly for armv7 targets
Allow selectively building just the intrinsics for armv8 Change-Id: I2f29b2e4508b8b8e5649c2906b3159ad1d4ec477
Diffstat (limited to 'build')
-rw-r--r--build/make/Android.mk11
-rwxr-xr-xbuild/make/configure.sh4
-rwxr-xr-xbuild/make/rtcd.pl8
3 files changed, 20 insertions, 3 deletions
diff --git a/build/make/Android.mk b/build/make/Android.mk
index 369c2a568..826ff2f81 100644
--- a/build/make/Android.mk
+++ b/build/make/Android.mk
@@ -61,6 +61,9 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
else ifeq ($(TARGET_ARCH_ABI),armeabi)
include $(CONFIG_DIR)libs-armv5te-android-gcc.mk
LOCAL_ARM_MODE := arm
+else ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
+ include $(CONFIG_DIR)libs-armv8-android-gcc.mk
+ LOCAL_ARM_MODE := arm
else ifeq ($(TARGET_ARCH_ABI),x86)
include $(CONFIG_DIR)libs-x86-android-gcc.mk
else ifeq ($(TARGET_ARCH_ABI),mips)
@@ -126,7 +129,7 @@ endef
ifeq ($(CONFIG_VP8_ENCODER), yes)
ASM_CNV_OFFSETS_DEPEND += $(ASM_CNV_PATH)/vp8_asm_enc_offsets.asm
endif
-ifeq ($(HAVE_NEON), yes)
+ifeq ($(HAVE_NEON_ASM), yes)
ASM_CNV_OFFSETS_DEPEND += $(ASM_CNV_PATH)/vpx_scale_asm_offsets.asm
endif
@@ -153,7 +156,11 @@ LOCAL_NEON_SRCS_C = $(filter %_neon.c, $(CODEC_SRCS_C))
LOCAL_CODEC_SRCS_C = $(filter-out vpx_config.c %_neon.c, $(CODEC_SRCS_C))
LOCAL_SRC_FILES += $(foreach file, $(LOCAL_CODEC_SRCS_C), libvpx/$(file))
-LOCAL_SRC_FILES += $(foreach file, $(LOCAL_NEON_SRCS_C), libvpx/$(file).neon)
+ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
+ LOCAL_SRC_FILES += $(foreach file, $(LOCAL_NEON_SRCS_C), libvpx/$(file).neon)
+else # If there are neon sources then we are building for arm64 and do not need to specify .neon
+ LOCAL_SRC_FILES += $(foreach file, $(LOCAL_NEON_SRCS_C), libvpx/$(file))
+endif
# Pull out assembly files, splitting NEON from the rest. This is
# done to specify that the NEON assembly files use NEON assembler flags.
diff --git a/build/make/configure.sh b/build/make/configure.sh
index 4c3b05f66..a2a64c2d5 100755
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -792,8 +792,12 @@ process_common_toolchain() {
arm*)
# on arm, isa versions are supersets
case ${tgt_isa} in
+ armv8)
+ soft_enable neon
+ ;;
armv7)
soft_enable neon
+ soft_enable neon_asm
soft_enable media
soft_enable edsp
soft_enable fast_unaligned
diff --git a/build/make/rtcd.pl b/build/make/rtcd.pl
index 18ee80d36..f5f59b146 100755
--- a/build/make/rtcd.pl
+++ b/build/make/rtcd.pl
@@ -272,6 +272,9 @@ sub arm() {
# Assign the helper variable for each enabled extension
foreach my $opt (@ALL_ARCHS) {
my $opt_uc = uc $opt;
+ # Enable neon assembly based on HAVE_NEON logic instead of adding new
+ # HAVE_NEON_ASM logic
+ if ($opt eq 'neon_asm') { $opt_uc = 'NEON' }
eval "\$have_${opt}=\"flags & HAS_${opt_uc}\"";
}
@@ -381,7 +384,10 @@ if ($opts{arch} eq 'x86') {
@ALL_ARCHS = filter(qw/edsp media/);
arm;
} elsif ($opts{arch} eq 'armv7') {
- @ALL_ARCHS = filter(qw/edsp media neon/);
+ @ALL_ARCHS = filter(qw/edsp media neon_asm neon/);
+ arm;
+} elsif ($opts{arch} eq 'armv8') {
+ @ALL_ARCHS = filter(qw/neon/);
arm;
} else {
unoptimized;