libc: x86: Use SSE2 or SSSE3 optimized routines when possible.

This patch uses the new hardware feature macros for x86 to define
various compile-time macros used to make the C library use
SSE2 and/or SSSE3 optimized memory functions for target CPUs
that support these features.

Note that previously, we relied on the macros being defined by
build/core/combo/TARGET_linux-x86.mk, but this is no longer the
case.

Change-Id: Ieae5ff5284c0c839bc920953fb6b91d2f2633afc
This commit is contained in:
David 'Digit' Turner 2011-12-14 18:23:40 +01:00
parent f6aa779383
commit a5cb76bca0

View File

@ -513,7 +513,12 @@ ifeq ($(TARGET_ARCH),arm)
else # !arm
ifeq ($(TARGET_ARCH),x86)
libc_crt_target_cflags :=
# TARGET_GLOBAL_CFLAGS from build/core/combo/TARGET_linux-x86.mk sets all required flags.
ifeq ($(ARCH_X86_HAVE_SSE2),true)
libc_crt_target_cflags += -DUSE_SSE2=1
endif
ifeq ($(ARCH_X86_HAVE_SSSE3),true)
libc_crt_target_cflags += -DUSE_SSSE3=1
endif
endif # x86
endif # !arm