diff options
author | Daniel Leung <daniel.leung@intel.com> | 2012-05-24 16:54:49 -0700 |
---|---|---|
committer | Andrew Boie <andrew.p.boie@intel.com> | 2013-09-24 12:53:18 -0700 |
commit | 51546ee32c22426aa85f2ee7cc2e8df7d774e385 (patch) | |
tree | f2ad68e05da0730958508cd19ebdf90620d48384 /libcutils/Android.mk | |
parent | 3c8bdef029cbaa8d8fa18e4e55e51b60e938dd6e (diff) | |
download | core-51546ee32c22426aa85f2ee7cc2e8df7d774e385.tar.gz core-51546ee32c22426aa85f2ee7cc2e8df7d774e385.tar.bz2 core-51546ee32c22426aa85f2ee7cc2e8df7d774e385.zip |
Use SSE2 enhanced memset for capable x86 processors
Originally, if TARGET_ARCH_VARIANT is x86-atom, the SSE2 enhanced
memset is used. This patch extends this to all x86 processors which
support SSE2 (i.e. ARCH_X86_HAVE_SSE2 is true).
Indentation added to the ifeq cases to make this easier to read.
Change-Id: I05f49e237a95359d3f2e3216b037e3fc1a0fbcb0
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Diffstat (limited to 'libcutils/Android.mk')
-rw-r--r-- | libcutils/Android.mk | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/libcutils/Android.mk b/libcutils/Android.mk index 503770563..57fc02191 100644 --- a/libcutils/Android.mk +++ b/libcutils/Android.mk @@ -125,18 +125,22 @@ LOCAL_SRC_FILES := $(commonSources) \ uevent.c ifeq ($(TARGET_ARCH),arm) -LOCAL_SRC_FILES += arch-arm/memset32.S + LOCAL_SRC_FILES += arch-arm/memset32.S else # !arm -ifeq ($(TARGET_ARCH_VARIANT),x86-atom) -LOCAL_CFLAGS += -DHAVE_MEMSET16 -DHAVE_MEMSET32 -LOCAL_SRC_FILES += arch-x86/android_memset16.S arch-x86/android_memset32.S memory.c -else # !x86-atom -ifeq ($(TARGET_ARCH),mips) -LOCAL_SRC_FILES += arch-mips/android_memset.c -else # !mips -LOCAL_SRC_FILES += memory.c -endif # !mips -endif # !x86-atom + ifeq ($(TARGET_ARCH),x86) + ifeq ($(ARCH_X86_HAVE_SSE2),true) + LOCAL_CFLAGS += -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DUSE_SSE2 + LOCAL_SRC_FILES += arch-x86/android_memset16.S arch-x86/android_memset32.S memory.c + else # !ARCH_X86_HAVE_SSE2 + LOCAL_SRC_FILES += memory.c + endif # !ARCH_X86_HAVE_SSE2 + else # !x86 + ifeq ($(TARGET_ARCH),mips) + LOCAL_SRC_FILES += arch-mips/android_memset.c + else # !mips + LOCAL_SRC_FILES += memory.c + endif # !mips + endif # !x86 endif # !arm LOCAL_C_INCLUDES := $(libcutils_c_includes) $(KERNEL_HEADERS) |