summaryrefslogtreecommitdiff
path: root/libc/string/x86_64/_glibc_inc.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-09-21 02:18:29 +0000
committerMike Frysinger <vapier@gentoo.org>2005-09-21 02:18:29 +0000
commitf5c0ac3d4499a11f4581c1b4ff16cef7d8cf4c0b (patch)
tree4f7ce150130560ccff718076cf102fb4d114752c /libc/string/x86_64/_glibc_inc.h
parent37016e09de57c7145d7dd29cd1166f21f150d2cb (diff)
merge x86_64 optimized string support
Diffstat (limited to 'libc/string/x86_64/_glibc_inc.h')
-rw-r--r--libc/string/x86_64/_glibc_inc.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/libc/string/x86_64/_glibc_inc.h b/libc/string/x86_64/_glibc_inc.h
new file mode 100644
index 000000000..f14b23c94
--- /dev/null
+++ b/libc/string/x86_64/_glibc_inc.h
@@ -0,0 +1,33 @@
+/*
+ * Setup some glibc defines so we can just drop in the
+ * asm files from glibc without any modification.
+ */
+
+#include <features.h>
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+# define ENTRY_ALIGN 4
+#else
+# define ENTRY_ALIGN 2
+#endif
+
+#define ENTRY(sym) \
+ .global sym; \
+ .align ENTRY_ALIGN; \
+ .type sym,%function; \
+ sym:
+
+#define BP_SYM(sym) sym
+
+#define L(sym) LOC(sym)
+#define LOC(sym) \
+ .L ## sym
+
+#define END(sym) \
+ .size sym,.-sym;
+
+#undef weak_alias
+#define weak_alias(sym, alias) \
+ .weak alias; \
+ alias = sym;