From a8d9ee1f663268a01583923a792d5ede5cd4a0f8 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sun, 15 Jun 2003 01:08:45 +0000 Subject: Implement syscall() for powerpc. Fixup syscall code so it compiles properly with gcc 3.3. -Erik --- libc/sysdeps/linux/powerpc/bits/syscalls.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'libc/sysdeps/linux/powerpc/bits/syscalls.h') 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 -#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 -- cgit v1.2.3