summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc/bits/syscalls.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-06-15 01:08:45 +0000
committerEric Andersen <andersen@codepoet.org>2003-06-15 01:08:45 +0000
commita8d9ee1f663268a01583923a792d5ede5cd4a0f8 (patch)
tree5147aae4184ca0870065fe5bd9f976dc5fbe138d /libc/sysdeps/linux/powerpc/bits/syscalls.h
parent5f9e364ca5cd244b4ccd63dd2954108bba1f7853 (diff)
Implement syscall() for powerpc. Fixup syscall code so
it compiles properly with gcc 3.3. -Erik
Diffstat (limited to 'libc/sysdeps/linux/powerpc/bits/syscalls.h')
-rw-r--r--libc/sysdeps/linux/powerpc/bits/syscalls.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/libc/sysdeps/linux/powerpc/bits/syscalls.h b/libc/sysdeps/linux/powerpc/bits/syscalls.h
index ec9e8507f..ac7395097 100644
--- a/libc/sysdeps/linux/powerpc/bits/syscalls.h
+++ b/libc/sysdeps/linux/powerpc/bits/syscalls.h
@@ -11,30 +11,31 @@
#include <bits/sysnum.h>
-#define STRINGIFY(s) STRINGIFY2 (s)
-#define STRINGIFY2(s) #s
+#define __STRINGIFY(s) __STRINGIFY2 (s)
+#define __STRINGIFY2(s) #s
+#undef JUMPTARGET
#ifdef __PIC__
-#define JUMPTARGET(name) STRINGIFY(name##@plt)
+#define __MAKE_SYSCALL __STRINGIFY(__uClibc_syscall@plt)
#else
-#define JUMPTARGET(name) STRINGIFY(name)
+#define __MAKE_SYSCALL __STRINGIFY(__uClibc_syscall)
#endif
#define unified_syscall_body(name) \
__asm__ ( \
".section \".text\"\n\t" \
".align 2\n\t" \
- ".globl " STRINGIFY(name) "\n\t" \
- ".type " STRINGIFY(name) ",@function\n" \
- #name":\n\tli 0," STRINGIFY(__NR_##name) "\n\t" \
- "b " JUMPTARGET(__uClibc_syscall) "\n" \
- ".Lfe1" STRINGIFY(name) ":\n\t" \
- ".size\t" STRINGIFY(name) ",.Lfe1" STRINGIFY(name) "-" STRINGIFY(name) "\n" \
+ ".globl " __STRINGIFY(name) "\n\t" \
+ ".type " __STRINGIFY(name) ",@function\n\t" \
+ #name":\n\tli 0," __STRINGIFY(__NR_##name) "\n\t" \
+ "b " __MAKE_SYSCALL "\n\t" \
+ ".Lfe1" __STRINGIFY(name) ":\n\t" \
+ ".size\t" __STRINGIFY(name) ",.Lfe1" __STRINGIFY(name) "-" __STRINGIFY(name) "\n" \
)
#undef _syscall0
-#define _syscall0(type,name) \
-type name(void); \
+#define _syscall0(type,name) \
+type name(void); \
unified_syscall_body(name)
#undef _syscall1