From cb7aae167e016a7fb85e64c9245f18d72a4a375b Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 9 Jul 2014 16:41:04 -0700 Subject: [PATCH] Fix arm emulator "D register out of range for selected VFP version" build failure. Change-Id: Ia37cb3f8ecb00a927fa3fc8b4131c158413646e7 --- debuggerd/Android.mk | 7 +++++++ debuggerd/arm/crashglue.S | 2 ++ 2 files changed, 9 insertions(+) diff --git a/debuggerd/Android.mk b/debuggerd/Android.mk index 191e283b7..c33b263ad 100644 --- a/debuggerd/Android.mk +++ b/debuggerd/Android.mk @@ -38,6 +38,8 @@ LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk include $(BUILD_EXECUTABLE) + + include $(CLEAR_VARS) LOCAL_SRC_FILES := crasher.c LOCAL_SRC_FILES_arm := arm/crashglue.S @@ -52,6 +54,11 @@ LOCAL_CFLAGS += -fstack-protector-all -Werror -Wno-free-nonheap-object #LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_SHARED_LIBRARIES := libcutils liblog libc +# The arm emulator has VFP but not VFPv3-D32. +ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) +LOCAL_ASFLAGS_arm += -DHAS_VFP_D32 +endif + LOCAL_MODULE := crasher LOCAL_MODULE_STEM_32 := crasher LOCAL_MODULE_STEM_64 := crasher64 diff --git a/debuggerd/arm/crashglue.S b/debuggerd/arm/crashglue.S index 864905687..4fbfd6e45 100644 --- a/debuggerd/arm/crashglue.S +++ b/debuggerd/arm/crashglue.S @@ -32,6 +32,7 @@ crash1: fconstd d13, #13 fconstd d14, #14 fconstd d15, #15 +#if defined(HAS_VFP_D32) fconstd d16, #16 fconstd d17, #17 fconstd d18, #18 @@ -48,6 +49,7 @@ crash1: fconstd d29, #29 fconstd d30, #30 fconstd d31, #31 +#endif mov lr, #0 ldr lr, [lr]