From: Apple Date: Wed, 12 Oct 2011 00:22:45 +0000 (+0000) Subject: Libc-763.12.tar.gz X-Git-Tag: mac-os-x-1072^0 X-Git-Url: https://git.saurik.com/apple/libc.git/commitdiff_plain/6990d062918770ee2431fb3310826c5aefbffccd Libc-763.12.tar.gz --- diff --git a/arm/string/dyld_resolvers.c b/arm/string/dyld_resolvers.c index 2adb0ef..e69de29 100644 --- a/arm/string/dyld_resolvers.c +++ b/arm/string/dyld_resolvers.c @@ -1,65 +0,0 @@ -// This file implements resolvers to assist dyld in choosing the correct -// implementation of routines on ARMv7 processors. The -// micro-architectural differences between Cortex-A8 and Cortex-A9 are such -// that optimal write loops are quite different on the two processors. -// -// The MakeResolver_a8_a9(name) macro creates a function that dyld calls to -// pick an implementation of the name function. It does a check to determine -// if it is running on a8 or a9 hardware, and returns a pointer to either -// -// name$VARIANT$CortexA8 -// or -// name$VARIANT$CortexA9 -// -// This resolution only occurs once per process; once a symbol is bound to an -// implementation in dyld, no further calls to the resolver occur. -// -// On unknown implementations of the ARMv7 architecture, the Cortex-A9 variant -// is returned by these resolvers. - -#include -#if defined _ARM_ARCH_7 && !defined VARIANT_DYLD - -#include -#include -#include - -#define MakeResolver_a8_a9(name) \ - void * name ## Resolver(void) __asm__("_" #name);\ - void * name ## Resolver(void) {\ - __asm__(".symbol_resolver _" #name);\ - if (*(int *)_COMM_PAGE_CPUFAMILY == CPUFAMILY_ARM_13)\ - return name ## $VARIANT$CortexA8;\ - else\ - return name ## $VARIANT$CortexA9;\ - } - -void bcopy$VARIANT$CortexA8(const void *, void *, size_t); -void bcopy$VARIANT$CortexA9(const void *, void *, size_t); -MakeResolver_a8_a9(bcopy) - -void *memmove$VARIANT$CortexA8(void *, const void *, size_t); -void *memmove$VARIANT$CortexA9(void *, const void *, size_t); -MakeResolver_a8_a9(memmove) - -void *memcpy$VARIANT$CortexA8(void *, const void *, size_t); -void *memcpy$VARIANT$CortexA9(void *, const void *, size_t); -MakeResolver_a8_a9(memcpy) - -void bzero$VARIANT$CortexA8(void *, size_t); -void bzero$VARIANT$CortexA9(void *, size_t); -MakeResolver_a8_a9(bzero) - -void __bzero$VARIANT$CortexA8(void *, size_t); -void __bzero$VARIANT$CortexA9(void *, size_t); -MakeResolver_a8_a9(__bzero) - -void *memset$VARIANT$CortexA8(void *, int, size_t); -void *memset$VARIANT$CortexA9(void *, int, size_t); -MakeResolver_a8_a9(memset) - -#else // defined _ARM_ARCH_7 && !defined VARIANT_DYLD - -typedef int emptyFilesArentCFiles; - -#endif // defined _ARM_ARCH_7 && !defined VARIANT_DYLD diff --git a/arm/string/memset_pattern.s b/arm/string/memset_pattern.s old mode 100644 new mode 100755 diff --git a/gen/malloc.c b/gen/malloc.c index 497a9b5..c923ef2 100644 --- a/gen/malloc.c +++ b/gen/malloc.c @@ -405,7 +405,7 @@ set_flags_from_environment(void) { malloc_debug_flags = SCALABLE_MALLOC_ABORT_ON_CORRUPTION; // Set always on 64-bit processes #else int libSystemVersion = NSVersionOfLinkTimeLibrary("System"); - if ((-1 != libSystemVersion) && ((libSystemVersion >> 16) < 126) /* CFSystemVersionBarolo */) + if ((-1 != libSystemVersion) && ((libSystemVersion >> 16) < 126) ) malloc_debug_flags = 0; else malloc_debug_flags = SCALABLE_MALLOC_ABORT_ON_CORRUPTION; @@ -625,8 +625,6 @@ __malloc_check_env_name(const char *name) { MALLOC_LOCK(); /* - * - * * 2. malloc will no longer take notice of *programmatic* changes to the MALLOC_* environment variables * (i.e. calls to putenv() or setenv() that manipulate these environment variables.) * diff --git a/i386/string/bcopy_sse2.s b/i386/string/bcopy_sse2.s index 4987c5e..cba82f0 100644 --- a/i386/string/bcopy_sse2.s +++ b/i386/string/bcopy_sse2.s @@ -152,6 +152,7 @@ LDestAligned: testl $15,%esi // is source aligned too? jnz LUnalignedLoop // no + cmpl $(kFastUCode),%eax // long enough for the fastpath in microcode? jb LAlignedLoop // no, use SSE cld // we'll move forward