aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2014-03-15 19:31:14 +0200
committerJukka Jylänki <jujjyl@gmail.com>2014-03-28 23:06:16 -0400
commit4c601e62b9d7cf6a2a873c6886f701ad7de31fde (patch)
tree3506c1fe13376cc25fac5cce84aa65b2dc6be8d5 /system
parent161e3630125de2b4431f99c65d2b2a9198400fa9 (diff)
Added musl 0.9.13 bcmp and bzero functions and migrated bcopy implementation to use musl for better asm.js performance.
Diffstat (limited to 'system')
-rw-r--r--system/lib/libc/musl/src/string/bcmp.c7
-rw-r--r--system/lib/libc/musl/src/string/bcopy.c7
-rw-r--r--system/lib/libc/musl/src/string/bzero.c7
-rw-r--r--system/lib/libcextra.symbols3
4 files changed, 24 insertions, 0 deletions
diff --git a/system/lib/libc/musl/src/string/bcmp.c b/system/lib/libc/musl/src/string/bcmp.c
new file mode 100644
index 00000000..5d6a388b
--- /dev/null
+++ b/system/lib/libc/musl/src/string/bcmp.c
@@ -0,0 +1,7 @@
+#include <string.h>
+#include <strings.h>
+
+int bcmp(const void *s1, const void *s2, size_t n)
+{
+ return memcmp(s1, s2, n);
+}
diff --git a/system/lib/libc/musl/src/string/bcopy.c b/system/lib/libc/musl/src/string/bcopy.c
new file mode 100644
index 00000000..e76272fc
--- /dev/null
+++ b/system/lib/libc/musl/src/string/bcopy.c
@@ -0,0 +1,7 @@
+#include <string.h>
+#include <strings.h>
+
+void bcopy(const void *s1, void *s2, size_t n)
+{
+ memmove(s2, s1, n);
+}
diff --git a/system/lib/libc/musl/src/string/bzero.c b/system/lib/libc/musl/src/string/bzero.c
new file mode 100644
index 00000000..0f98b4a5
--- /dev/null
+++ b/system/lib/libc/musl/src/string/bzero.c
@@ -0,0 +1,7 @@
+#include <string.h>
+#include <strings.h>
+
+void bzero(void *s, size_t n)
+{
+ memset(s, 0, n);
+}
diff --git a/system/lib/libcextra.symbols b/system/lib/libcextra.symbols
index b4528c50..6620faa9 100644
--- a/system/lib/libcextra.symbols
+++ b/system/lib/libcextra.symbols
@@ -23,6 +23,9 @@
T __wcsxfrm_l
W __wctype_l
T atoll
+ T bcmp
+ T bcopy
+ T bzero
T bsearch
T btowc
T ecvt