summaryrefslogtreecommitdiffstats
path: root/libc/include
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2012-07-13 17:49:10 -0700
committerNick Kralevich <nnk@google.com>2012-07-13 17:58:37 -0700
commitc37fc1ab6a3ac3956a8c9ba3ac089d41969815ed (patch)
tree8fd21828b1fc97423bbe5e3652513772260604f3 /libc/include
parente1d909f71e183ac3d1e21af5bb1af35d30e9de5b (diff)
downloadbionic-c37fc1ab6a3ac3956a8c9ba3ac089d41969815ed.zip
bionic-c37fc1ab6a3ac3956a8c9ba3ac089d41969815ed.tar.gz
bionic-c37fc1ab6a3ac3956a8c9ba3ac089d41969815ed.tar.bz2
FORTIFY_SOURCE: revert memcpy changes.
Performance regressions. Hopefully this is a temporary rollback. Bug: 6821003 Change-Id: I84abbb89e1739d506b583f2f1668f31534127764
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/string.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/libc/include/string.h b/libc/include/string.h
index 8730ea3..8e472e7 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -93,10 +93,6 @@ extern void __memcpy_src_size_error()
__attribute__((__error__("memcpy called with size bigger than source")));
extern void __memcpy_overlap_error()
__attribute__((__error__("memcpy called with overlapping regions")));
-extern void *__memcpy_real(void *, const void *, size_t)
- __asm__(__USER_LABEL_PREFIX__ "memcpy");
-extern void *__memcpy_chk2(void *, const void *, size_t, size_t, size_t);
-
__BIONIC_FORTIFY_INLINE
void *memcpy (void *dest, const void *src, size_t copy_amount) {
@@ -118,11 +114,7 @@ void *memcpy (void *dest, const void *src, size_t copy_amount) {
__memcpy_overlap_error();
}
- if (__builtin_constant_p(copy_amount) && __builtin_constant_p(d - s)) {
- return __memcpy_real(dest, src, copy_amount);
- }
-
- return __memcpy_chk2(dest, src, copy_amount, d_len, s_len);
+ return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
}
__BIONIC_FORTIFY_INLINE