project build/ diff --git a/core/main.mk b/core/main.mk index 2c7bb78..d9cfec9 100644 --- a/core/main.mk +++ b/core/main.mk @@ -197,7 +197,7 @@ ifneq (,$(user_variant)) else # !user_variant # Turn on checkjni for non-user builds. - ADDITIONAL_BUILD_PROPERTIES += ro.kernel.android.checkjni=1 + ADDITIONAL_BUILD_PROPERTIES += ro.kernel.android.checkjni=0 # Set device insecure for non-user builds. ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0 # Allow mock locations by default for non user builds project external/opencore/ diff --git a/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op.h b/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op.h index f6c80e2..35d2055 100644 --- a/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op.h +++ b/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op.h @@ -65,15 +65,15 @@ terms listed above has been obtained from the copyright holder. ----------------------------------------------------------------------------*/ #include "basicop_malloc.h" -#if defined(PV_ARM_V5) +#if defined(__ARM_ARCH_4T__) +#include "basic_op_c_equivalent.h" + +#elif defined(PV_ARM_V5) #include "basic_op_arm_v5.h" #elif defined(PV_ARM_GCC_V5) #include "basic_op_arm_gcc_v5.h" -#else -#include "basic_op_c_equivalent.h" - #endif diff --git a/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h b/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h index 533b105..908dd6a 100644 --- a/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h +++ b/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h @@ -101,7 +101,7 @@ extern "C" ; GLOBAL FUNCTION DEFINITIONS ; Function Prototype declaration ----------------------------------------------------------------------------*/ -#if !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) ) +#if defined(__ARM_ARCH_4T__) || !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) ) /* C EQUIVALENT */ Word16 norm_l(Word32 L_var1); diff --git a/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_s.h b/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_s.h index 2e37a9f..b243cef 100644 --- a/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_s.h +++ b/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_s.h @@ -99,7 +99,7 @@ extern "C" ; GLOBAL FUNCTION DEFINITIONS ; Function Prototype declaration ----------------------------------------------------------------------------*/ -#if !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) ) +#if defined(__ARM_ARCH_4T__) || !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) ) /* C EQUIVALENT */ diff --git a/codecs_v2/audio/mp3/dec/Android.mk b/codecs_v2/audio/mp3/dec/Android.mk index 26e69b0..22fb5eb 100644 --- a/codecs_v2/audio/mp3/dec/Android.mk +++ b/codecs_v2/audio/mp3/dec/Android.mk @@ -34,12 +34,14 @@ LOCAL_SRC_FILES := \ src/pvmp3_dct_16.cpp ifeq ($(TARGET_ARCH),arm) +ifneq ($(TARGET_ARCH_VERSION),armv4t) LOCAL_SRC_FILES += \ src/asm/pvmp3_polyphase_filter_window_gcc.s \ src/asm/pvmp3_mdct_18_gcc.s \ src/asm/pvmp3_dct_9_gcc.s \ src/asm/pvmp3_dct_16_gcc.s endif +endif LOCAL_MODULE := libpvmp3 diff --git a/tools_v2/build/make/android_make_extras.mk b/tools_v2/build/make/android_make_extras.mk index fd425e6..c7eba67 100644 --- a/tools_v2/build/make/android_make_extras.mk +++ b/tools_v2/build/make/android_make_extras.mk @@ -133,9 +133,11 @@ $1: FORCE $$(quiet) echo " PV_CFLAGS += -DPVLOGGER_INST_LEVEL=5" >> $$@ $$(quiet) echo "endif" >> $$@ $$(quiet) echo "" >> $$@ + $$(quiet) echo " ifeq ($$(esc_dollar)(TARGET_ARCH_VERSION),armv5te)" >> $$@ $$(quiet) echo "ifeq ($$(esc_dollar)(TARGET_ARCH),arm)" >> $$@ $$(quiet) echo " PV_CFLAGS += -DPV_ARM_GCC_V5" >> $$@ $$(quiet) echo "endif" >> $$@ + $$(quiet) echo "endif" >> $$@ $$(quiet) echo "" >> $$@ $$(quiet) echo "include $$(esc_dollar)(CLEAR_VARS)" >> $$@ $$(quiet) echo "" >> $$@ diff --git a/tools_v2/build/make/platforms/android.mk b/tools_v2/build/make/platforms/android.mk index 3a7b908..801ae05 100644 --- a/tools_v2/build/make/platforms/android.mk +++ b/tools_v2/build/make/platforms/android.mk @@ -13,7 +13,9 @@ AR := arm-eabi-ar export RANLIB := arm-eabi-ranlib # This toolchain supports linux-arm v5 +ifeq ($(TARGET_ARCH_VERSION),armv5te) DEFAULT_CPP_ASM_FLAGS := -DPV_ARM_GCC_V5 +endif PROCESSOR := arm # include the common engine header files in the search path diff --git a/tools_v2/build/make/platforms/linux_arm.mk b/tools_v2/build/make/platforms/linux_arm.mk index 38767e2..5ec8d49 100644 --- a/tools_v2/build/make/platforms/linux_arm.mk +++ b/tools_v2/build/make/platforms/linux_arm.mk @@ -10,7 +10,11 @@ STRIP := arm-linux-strip export RANLIB = arm-linux-ranlib # This toolchain supports linux-arm v5 +ifeq ($(TARGET_ARCH_VERSION),armv5te) DEFAULT_CPP_ASM_FLAGS := -DPV_ARM_GCC_V5 +else +DEFAULT_CPP_ASM_FLAGS := +endif PROCESSOR := arm # include the common engine header files in the search path project external/openssl/ diff --git a/crypto/Android.mk b/crypto/Android.mk index 0b2aa9e..039a73e 100644 --- a/crypto/Android.mk +++ b/crypto/Android.mk @@ -2,7 +2,8 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) ifeq ($(TARGET_ARCH),arm) - LOCAL_CFLAGS += -DOPENSSL_BN_ASM_MONT -DAES_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM + LOCAL_CFLAGS += -DOPENSSL_BN_ASM_MONT -DAES_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -O2 -DOPENSSL_NO_MD +# LOCAL_CFLAGS += -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -O2 -fomit-frame-pointer -Wall -DOPENSSL_NO_BF -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CAST -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_HW LOCAL_SRC_FILES:= 0.9.9-dev/bn/armv4-mont.s \ 0.9.9-dev/aes/aes-armv4.s \ 0.9.9-dev/sha/sha1-armv4-large.s \ project external/skia/ diff --git a/Android.mk b/Android.mk index 8afd5af..6eed115 100644 --- a/Android.mk +++ b/Android.mk @@ -184,10 +184,12 @@ LOCAL_SRC_FILES += \ # including the optimized assembly code for the src-overing operation ifeq ($(TARGET_ARCH),arm) +ifneq ($(TARGET_ARCH_VERSION),armv4t) LOCAL_CFLAGS += -DUSE_ARM_ASM LOCAL_SRC_FILES += \ src/core/asm/s32a_d565_opaque.S endif +endif LOCAL_SHARED_LIBRARIES := \ libcutils \ diff --git a/include/core/SkMath.h b/include/core/SkMath.h index 0c89065..076bfe7 100644 --- a/include/core/SkMath.h +++ b/include/core/SkMath.h @@ -162,7 +162,7 @@ static inline int SkNextLog2(uint32_t value) { With this requirement, we can generate faster instructions on some architectures. */ -#if defined(__arm__) && !defined(__thumb__) && !defined(__ARM_ARCH_4__) +#if defined(__arm__) && !defined(__thumb__) && !defined(__ARM_ARCH_4__) && !defined(__ARM_ARCH_4T__) static inline int32_t SkMulS16(S16CPU x, S16CPU y) { SkASSERT((int16_t)x == x); SkASSERT((int16_t)y == y); project external/sonivox/ diff --git a/arm-wt-22k/Android.mk b/arm-wt-22k/Android.mk index 71fbcf8..5f7adf4 100644 --- a/arm-wt-22k/Android.mk +++ b/arm-wt-22k/Android.mk @@ -75,6 +75,7 @@ LOCAL_COPY_HEADERS := \ host_src/jet.h ifeq ($(TARGET_ARCH),arm) +ifneq ($(TARGET_ARCH_VERSION),armv4t) LOCAL_SRC_FILES+= \ lib_src/ARM-E_filter_gnu.s \ lib_src/ARM-E_interpolate_loop_gnu.s \ @@ -94,6 +95,7 @@ LOCAL_CFLAGS+= -D NATIVE_EAS_KERNEL \ LOCAL_COPY_HEADERS += lib_src/ARM_synth_constants_gnu.inc endif +endif LOCAL_SHARED_LIBRARIES := \ libutils libcutils diff --git a/arm-wt-22k/lib_src/eas_mixer.c b/arm-wt-22k/lib_src/eas_mixer.c index c4a2f9f..89e357a 100644 --- a/arm-wt-22k/lib_src/eas_mixer.c +++ b/arm-wt-22k/lib_src/eas_mixer.c @@ -8,18 +8,18 @@ * must be optimized for best performance. * * Copyright Sonic Network Inc. 2005 - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * *---------------------------------------------------------------------------- * Revision Control: @@ -250,7 +250,7 @@ void EAS_MixEnginePost (S_EAS_DATA *pEASData, EAS_I32 numSamples) } -#ifndef NATIVE_EAS_KERNEL +#if !defined(NATIVE_EAS_KERNEL) || defined (__ARM_ARCH_4T__) /*---------------------------------------------------------------------------- * SynthMasterGain *---------------------------------------------------------------------------- diff --git a/arm-wt-22k/lib_src/eas_wtengine.c b/arm-wt-22k/lib_src/eas_wtengine.c index dd46f22..4ff742d 100644 --- a/arm-wt-22k/lib_src/eas_wtengine.c +++ b/arm-wt-22k/lib_src/eas_wtengine.c @@ -57,7 +57,7 @@ extern void WT_Interpolate (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame); extern void WT_VoiceFilter (S_FILTER_CONTROL*pFilter, S_WT_INT_FRAME *pWTIntFrame); #endif -#if defined(_OPTIMIZED_MONO) || !defined(NATIVE_EAS_KERNEL) +#if defined(_OPTIMIZED_MONO) || !defined(NATIVE_EAS_KERNEL) || defined(__ARM_ARCH_4T__) /*---------------------------------------------------------------------------- * WT_VoiceGain *---------------------------------------------------------------------------- @@ -155,7 +155,7 @@ void WT_VoiceGain (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) } #endif -#ifndef NATIVE_EAS_KERNEL +#if !defined(NATIVE_EAS_KERNEL) || defined(__ARM_ARCH_4T__) /*---------------------------------------------------------------------------- * WT_Interpolate *---------------------------------------------------------------------------- @@ -249,7 +249,7 @@ void WT_Interpolate (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) } #endif -#ifndef NATIVE_EAS_KERNEL +#if !defined(NATIVE_EAS_KERNEL) || defined(__ARM_ARCH_4T__) /*---------------------------------------------------------------------------- * WT_InterpolateNoLoop *---------------------------------------------------------------------------- @@ -336,7 +336,7 @@ void WT_InterpolateNoLoop (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) } #endif -#if defined(_FILTER_ENABLED) && !defined(NATIVE_EAS_KERNEL) +#if defined(_FILTER_ENABLED) && ( !defined(NATIVE_EAS_KERNEL) || defined(__ARM_ARCH_4T__) ) /*---------------------------------------------------------------------------- * WT_VoiceFilter *---------------------------------------------------------------------------- project frameworks/base/ diff --git a/libs/audioflinger/AudioMixer.cpp b/libs/audioflinger/AudioMixer.cpp index b02efcc..de3a8a8 100644 --- a/libs/audioflinger/AudioMixer.cpp +++ b/libs/audioflinger/AudioMixer.cpp @@ -401,7 +401,7 @@ void AudioMixer::process__validate(state_t* state, void* output) static inline int32_t mulAdd(int16_t in, int16_t v, int32_t a) { -#if defined(__arm__) && !defined(__thumb__) +#if defined(__arm__) && !defined(__thumb__) && !defined(__ARM_ARCH_4T__) int32_t out; asm( "smlabb %[out], %[in], %[v], %[a] \n" : [out]"=r"(out) @@ -416,7 +416,7 @@ int32_t mulAdd(int16_t in, int16_t v, int32_t a) static inline int32_t mul(int16_t in, int16_t v) { -#if defined(__arm__) && !defined(__thumb__) +#if defined(__arm__) && !defined(__thumb__) && !defined(__ARM_ARCH_4T__) int32_t out; asm( "smulbb %[out], %[in], %[v] \n" : [out]"=r"(out) @@ -431,7 +431,7 @@ int32_t mul(int16_t in, int16_t v) static inline int32_t mulAddRL(int left, uint32_t inRL, uint32_t vRL, int32_t a) { -#if defined(__arm__) && !defined(__thumb__) +#if defined(__arm__) && !defined(__thumb__) && !defined(__ARM_ARCH_4T__) int32_t out; if (left) { asm( "smlabb %[out], %[inRL], %[vRL], %[a] \n" @@ -457,7 +457,7 @@ int32_t mulAddRL(int left, uint32_t inRL, uint32_t vRL, int32_t a) static inline int32_t mulRL(int left, uint32_t inRL, uint32_t vRL) { -#if defined(__arm__) && !defined(__thumb__) +#if defined(__arm__) && !defined(__thumb__) && !defined(__ARM_ARCH_4T__) int32_t out; if (left) { asm( "smulbb %[out], %[inRL], %[vRL] \n" diff --git a/libs/audioflinger/AudioResamplerSinc.cpp b/libs/audioflinger/AudioResamplerSinc.cpp index 9e5e254..f2c9858 100644 --- a/libs/audioflinger/AudioResamplerSinc.cpp +++ b/libs/audioflinger/AudioResamplerSinc.cpp @@ -62,7 +62,7 @@ const int32_t AudioResamplerSinc::mFirCoefsDown[] = { static inline int32_t mulRL(int left, int32_t in, uint32_t vRL) { -#if defined(__arm__) && !defined(__thumb__) +#if defined(__arm__) && !defined(__thumb__) && !defined(__ARM_ARCH_4T__) int32_t out; if (left) { asm( "smultb %[out], %[in], %[vRL] \n" @@ -88,7 +88,7 @@ int32_t mulRL(int left, int32_t in, uint32_t vRL) static inline int32_t mulAdd(int16_t in, int32_t v, int32_t a) { -#if defined(__arm__) && !defined(__thumb__) +#if defined(__arm__) && !defined(__thumb__) && !defined(__ARM_ARCH_4T__) int32_t out; asm( "smlawb %[out], %[v], %[in], %[a] \n" : [out]"=r"(out) @@ -105,7 +105,7 @@ int32_t mulAdd(int16_t in, int32_t v, int32_t a) static inline int32_t mulAddRL(int left, uint32_t inRL, int32_t v, int32_t a) { -#if defined(__arm__) && !defined(__thumb__) +#if defined(__arm__) && !defined(__thumb__) && !defined(__ARM_ARCH_4T__) int32_t out; if (left) { asm( "smlawb %[out], %[v], %[inRL], %[a] \n" project system/core/ diff --git a/libpixelflinger/Android.mk b/libpixelflinger/Android.mk index 50eb5f5..49a3029 100644 --- a/libpixelflinger/Android.mk +++ b/libpixelflinger/Android.mk @@ -6,11 +6,13 @@ include $(CLEAR_VARS) # ifeq ($(TARGET_ARCH),arm) +ifeq ($(TARGET_ARCH_VERSION),armv6) LOCAL_ASFLAGS := -march=armv6 LOCAL_SRC_FILES := rotate90CW_4x4_16v6.S LOCAL_MODULE := libpixelflinger_armv6 include $(BUILD_STATIC_LIBRARY) endif +endif # # C/C++ and ARMv5 objects @@ -40,8 +42,10 @@ PIXELFLINGER_SRC_FILES:= \ buffer.cpp ifeq ($(TARGET_ARCH),arm) +ifneq ($(TARGET_ARCH_VERSION),armv4t) PIXELFLINGER_SRC_FILES += t32cb16blend.S endif +endif ifeq ($(TARGET_ARCH),arm) # special optimization flags for pixelflinger @@ -71,8 +75,10 @@ LOCAL_SHARED_LIBRARIES += libhardware_legacy LOCAL_CFLAGS += -DWITH_LIB_HARDWARE endif ifeq ($(TARGET_ARCH),arm) +ifeq ($(TARGET_ARCH_VERSION),armv6) LOCAL_WHOLE_STATIC_LIBRARIES := libpixelflinger_armv6 endif +endif include $(BUILD_SHARED_LIBRARY) # @@ -84,8 +90,10 @@ LOCAL_MODULE:= libpixelflinger_static LOCAL_SRC_FILES := $(PIXELFLINGER_SRC_FILES) LOCAL_CFLAGS := $(PIXELFLINGER_CFLAGS) ifeq ($(TARGET_ARCH),arm) +ifeq ($(TARGET_ARCH_VERSION),armv6) LOCAL_WHOLE_STATIC_LIBRARIES := libpixelflinger_armv6 endif +endif include $(BUILD_STATIC_LIBRARY) diff --git a/libpixelflinger/scanline.cpp b/libpixelflinger/scanline.cpp index f700306..eb49ee6 100644 --- a/libpixelflinger/scanline.cpp +++ b/libpixelflinger/scanline.cpp @@ -1321,7 +1321,7 @@ void scanline_t32cb16blend(context_t* c) const int32_t v = (c->state.texture[0].shade.it0>>16) + y; uint32_t *src = reinterpret_cast(tex->data)+(u+(tex->stride*v)); -#if ((ANDROID_CODEGEN >= ANDROID_CODEGEN_ASM) && defined(__arm__)) +#if ((ANDROID_CODEGEN >= ANDROID_CODEGEN_ASM) && defined(__arm__) && !defined(__ARM_ARCH_4T__) ) scanline_t32cb16blend_arm(dst, src, ct); #else while (ct--) {