1# 32-bit x86. 2 3# 4# Generic x86 optimizations, may be overriden by CPU variants. 5# 6 7libc_bionic_src_files_x86 += \ 8 arch-x86/atom/string/sse2-memchr-atom.S \ 9 arch-x86/atom/string/sse2-memrchr-atom.S \ 10 arch-x86/atom/string/sse2-strchr-atom.S \ 11 arch-x86/atom/string/sse2-strnlen-atom.S \ 12 arch-x86/atom/string/sse2-strrchr-atom.S \ 13 arch-x86/atom/string/sse2-wcschr-atom.S \ 14 arch-x86/atom/string/sse2-wcsrchr-atom.S \ 15 arch-x86/atom/string/sse2-wcslen-atom.S \ 16 arch-x86/atom/string/sse2-wcscmp-atom.S \ 17 arch-x86/silvermont/string/sse2-bcopy-slm.S \ 18 arch-x86/silvermont/string/sse2-bzero-slm.S \ 19 arch-x86/silvermont/string/sse2-memcpy-slm.S \ 20 arch-x86/silvermont/string/sse2-memmove-slm.S \ 21 arch-x86/silvermont/string/sse2-memset-slm.S \ 22 arch-x86/silvermont/string/sse2-stpcpy-slm.S \ 23 arch-x86/silvermont/string/sse2-stpncpy-slm.S \ 24 arch-x86/silvermont/string/sse2-strcpy-slm.S \ 25 arch-x86/silvermont/string/sse2-strlen-slm.S \ 26 arch-x86/silvermont/string/sse2-strncpy-slm.S 27 28libc_bionic_src_files_x86 += \ 29 arch-x86/generic/string/memcmp.S \ 30 arch-x86/generic/string/strcmp.S \ 31 arch-x86/generic/string/strncmp.S \ 32 arch-x86/generic/string/strcat.S 33 34ifeq ($(ARCH_X86_HAVE_SSSE3),true) 35libc_bionic_src_files_x86 += \ 36 arch-x86/atom/string/ssse3-strncat-atom.S \ 37 arch-x86/atom/string/ssse3-strlcat-atom.S \ 38 arch-x86/atom/string/ssse3-strlcpy-atom.S \ 39 arch-x86/atom/string/ssse3-strcmp-atom.S \ 40 arch-x86/atom/string/ssse3-strncmp-atom.S \ 41 arch-x86/atom/string/ssse3-strcat-atom.S \ 42 arch-x86/atom/string/ssse3-wcscat-atom.S \ 43 arch-x86/atom/string/ssse3-wcscpy-atom.S 44libc_bionic_src_files_exclude_x86 += \ 45 arch-x86/generic/string/strcmp.S \ 46 arch-x86/generic/string/strncmp.S \ 47 arch-x86/generic/string/strcat.S 48endif 49 50ifeq ($(ARCH_X86_HAVE_SSE4),true) 51libc_bionic_src_files_x86 += \ 52 arch-x86/silvermont/string/sse4-memcmp-slm.S \ 53 arch-x86/silvermont/string/sse4-wmemcmp-slm.S 54libc_bionic_src_files_exclude_x86 += \ 55 arch-x86/generic/string/memcmp.S 56endif 57 58# 59# Remove default implementations that we have optimized versions of. 60# 61 62libc_freebsd_src_files_exclude_x86 += \ 63 upstream-freebsd/lib/libc/string/wcschr.c \ 64 upstream-freebsd/lib/libc/string/wcscmp.c \ 65 upstream-freebsd/lib/libc/string/wcslen.c \ 66 upstream-freebsd/lib/libc/string/wcsrchr.c \ 67 68ifeq ($(ARCH_X86_HAVE_SSSE3),true) 69libc_freebsd_src_files_exclude_x86 += \ 70 upstream-freebsd/lib/libc/string/wcscat.c \ 71 upstream-freebsd/lib/libc/string/wcscpy.c 72endif 73 74ifeq ($(ARCH_X86_HAVE_SSE4),true) 75libc_freebsd_src_files_exclude_x86 += \ 76 upstream-freebsd/lib/libc/string/wmemcmp.c 77endif 78 79libc_openbsd_src_files_exclude_x86 += \ 80 upstream-openbsd/lib/libc/string/memchr.c \ 81 upstream-openbsd/lib/libc/string/memmove.c \ 82 upstream-openbsd/lib/libc/string/memrchr.c \ 83 upstream-openbsd/lib/libc/string/stpcpy.c \ 84 upstream-openbsd/lib/libc/string/stpncpy.c \ 85 upstream-openbsd/lib/libc/string/strcat.c \ 86 upstream-openbsd/lib/libc/string/strcpy.c \ 87 upstream-openbsd/lib/libc/string/strncmp.c \ 88 upstream-openbsd/lib/libc/string/strncpy.c \ 89 90ifeq ($(ARCH_X86_HAVE_SSSE3),true) 91libc_openbsd_src_files_exclude_x86 += \ 92 upstream-openbsd/lib/libc/string/strlcat.c \ 93 upstream-openbsd/lib/libc/string/strlcpy.c \ 94 upstream-openbsd/lib/libc/string/strncat.c 95endif 96 97libc_bionic_src_files_exclude_x86 += \ 98 bionic/strchr.cpp \ 99 bionic/strnlen.c \ 100 bionic/strrchr.cpp \ 101 102# 103# Inherently architecture-specific functions. 104# 105 106libc_bionic_src_files_x86 += \ 107 arch-x86/bionic/__bionic_clone.S \ 108 arch-x86/bionic/_exit_with_stack_teardown.S \ 109 arch-x86/bionic/libgcc_compat.c \ 110 arch-x86/bionic/__restore.S \ 111 arch-x86/bionic/setjmp.S \ 112 arch-x86/bionic/syscall.S \ 113 arch-x86/bionic/vfork.S \ 114 115## ARCH variant specific source files 116arch_variant_mk := $(LOCAL_PATH)/arch-x86/$(TARGET_ARCH_VARIANT)/$(TARGET_ARCH_VARIANT).mk 117ifeq ($(wildcard $(arch_variant_mk)),) 118 arch_variant_mk := 119endif 120ifneq ($(arch_variant_mk),) 121include $(arch_variant_mk) 122libc_common_additional_dependencies += $(arch_variant_mk) 123 124arch_variant_mk := 125endif 126 127libc_crt_target_cflags_x86 := \ 128 -m32 \ 129 -I$(LOCAL_PATH)/arch-x86/include 130 131libc_crt_target_ldflags_x86 := -melf_i386 132 133libc_crt_target_crtbegin_file_x86 := \ 134 $(LOCAL_PATH)/arch-common/bionic/crtbegin.c 135 136libc_crt_target_crtbegin_so_file_x86 := \ 137 $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c 138 139libc_crt_target_so_cflags_x86 := \ 140 -fPIC 141