diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc')
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h | 30 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h | 30 |
2 files changed, 32 insertions, 28 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h index 269b4dd531..2ee3e60229 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h @@ -79,7 +79,7 @@ # define INTERNAL_SYSCALL_DECL(err) long int err # undef INTERNAL_SYSCALL -# define INTERNAL_SYSCALL(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ ({ \ register long int r0 __asm__ ("r0"); \ register long int r3 __asm__ ("r3"); \ @@ -104,6 +104,8 @@ err = r0; \ (int) r3; \ }) +# define INTERNAL_SYSCALL(name, err, nr, args...) \ + INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args) # undef INTERNAL_SYSCALL_ERROR_P # define INTERNAL_SYSCALL_ERROR_P(val, err) \ @@ -113,48 +115,48 @@ # define INTERNAL_SYSCALL_ERRNO(val, err) (val) # define LOADARGS_0(name, dummy) \ - r0 = __NR_##name + r0 = name # define LOADARGS_1(name, __arg1) \ long int arg1 = (long int) (__arg1); \ LOADARGS_0(name, 0); \ - extern void __illegally_sized_syscall_##name##_arg1 (void); \ + extern void __illegally_sized_syscall_arg1 (void); \ if (__builtin_classify_type (__arg1) != 5 && sizeof (__arg1) > 4) \ - __illegally_sized_syscall_##name##_arg1 (); \ + __illegally_sized_syscall_arg1 (); \ r3 = arg1 # define LOADARGS_2(name, __arg1, __arg2) \ long int arg2 = (long int) (__arg2); \ LOADARGS_1(name, __arg1); \ - extern void __illegally_sized_syscall_##name##_arg2 (void); \ + extern void __illegally_sized_syscall_arg2 (void); \ if (__builtin_classify_type (__arg2) != 5 && sizeof (__arg2) > 4) \ - __illegally_sized_syscall_##name##_arg2 (); \ + __illegally_sized_syscall_arg2 (); \ r4 = arg2 # define LOADARGS_3(name, __arg1, __arg2, __arg3) \ long int arg3 = (long int) (__arg3); \ LOADARGS_2(name, __arg1, __arg2); \ - extern void __illegally_sized_syscall_##name##_arg3 (void); \ + extern void __illegally_sized_syscall_arg3 (void); \ if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 4) \ - __illegally_sized_syscall_##name##_arg3 (); \ + __illegally_sized_syscall_arg3 (); \ r5 = arg3 # define LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4) \ long int arg4 = (long int) (__arg4); \ LOADARGS_3(name, __arg1, __arg2, __arg3); \ - extern void __illegally_sized_syscall_##name##_arg4 (void); \ + extern void __illegally_sized_syscall_arg4 (void); \ if (__builtin_classify_type (__arg4) != 5 && sizeof (__arg4) > 4) \ - __illegally_sized_syscall_##name##_arg4 (); \ + __illegally_sized_syscall_arg4 (); \ r6 = arg4 # define LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5) \ long int arg5 = (long int) (__arg5); \ LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4); \ - extern void __illegally_sized_syscall_##name##_arg5 (void); \ + extern void __illegally_sized_syscall_arg5 (void); \ if (__builtin_classify_type (__arg5) != 5 && sizeof (__arg5) > 4) \ - __illegally_sized_syscall_##name##_arg5 (); \ + __illegally_sized_syscall_arg5 (); \ r7 = arg5 # define LOADARGS_6(name, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \ long int arg6 = (long int) (__arg6); \ LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5); \ - extern void __illegally_sized_syscall_##name##_arg6 (void); \ + extern void __illegally_sized_syscall_arg6 (void); \ if (__builtin_classify_type (__arg6) != 5 && sizeof (__arg6) > 4) \ - __illegally_sized_syscall_##name##_arg6 (); \ + __illegally_sized_syscall_arg6 (); \ r8 = arg6 # define ASM_INPUT_0 "0" (r0) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index 2e1adccd5d..38a376fa90 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -91,7 +91,7 @@ the negation of the return value in the kernel gets reverted. */ #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) \ +#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ ({ \ register long int r0 __asm__ ("r0"); \ register long int r3 __asm__ ("r3"); \ @@ -114,6 +114,8 @@ err = r0; \ (int) r3; \ }) +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args) #undef INTERNAL_SYSCALL_DECL #define INTERNAL_SYSCALL_DECL(err) long int err @@ -126,48 +128,48 @@ #define INTERNAL_SYSCALL_ERRNO(val, err) (val) #define LOADARGS_0(name, dummy) \ - r0 = __NR_##name + r0 = name #define LOADARGS_1(name, __arg1) \ long int arg1 = (long int) (__arg1); \ LOADARGS_0(name, 0); \ - extern void __illegally_sized_syscall_##name##_arg1 (void); \ + extern void __illegally_sized_syscall_arg1 (void); \ if (__builtin_classify_type (__arg1) != 5 && sizeof (__arg1) > 8) \ - __illegally_sized_syscall_##name##_arg1 (); \ + __illegally_sized_syscall_arg1 (); \ r3 = arg1 #define LOADARGS_2(name, __arg1, __arg2) \ long int arg2 = (long int) (__arg2); \ LOADARGS_1(name, __arg1); \ - extern void __illegally_sized_syscall_##name##_arg2 (void); \ + extern void __illegally_sized_syscall_arg2 (void); \ if (__builtin_classify_type (__arg2) != 5 && sizeof (__arg2) > 8) \ - __illegally_sized_syscall_##name##_arg2 (); \ + __illegally_sized_syscall_arg2 (); \ r4 = arg2 #define LOADARGS_3(name, __arg1, __arg2, __arg3) \ long int arg3 = (long int) (__arg3); \ LOADARGS_2(name, __arg1, __arg2); \ - extern void __illegally_sized_syscall_##name##_arg3 (void); \ + extern void __illegally_sized_syscall_arg3 (void); \ if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 8) \ - __illegally_sized_syscall_##name##_arg3 (); \ + __illegally_sized_syscall_arg3 (); \ r5 = arg3 #define LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4) \ long int arg4 = (long int) (__arg4); \ LOADARGS_3(name, __arg1, __arg2, __arg3); \ - extern void __illegally_sized_syscall_##name##_arg4 (void); \ + extern void __illegally_sized_syscall_arg4 (void); \ if (__builtin_classify_type (__arg4) != 5 && sizeof (__arg4) > 8) \ - __illegally_sized_syscall_##name##_arg4 (); \ + __illegally_sized_syscall_arg4 (); \ r6 = arg4 #define LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5) \ long int arg5 = (long int) (__arg5); \ LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4); \ - extern void __illegally_sized_syscall_##name##_arg5 (void); \ + extern void __illegally_sized_syscall_arg5 (void); \ if (__builtin_classify_type (__arg5) != 5 && sizeof (__arg5) > 8) \ - __illegally_sized_syscall_##name##_arg5 (); \ + __illegally_sized_syscall_arg5 (); \ r7 = arg5 #define LOADARGS_6(name, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \ long int arg6 = (long int) (__arg6); \ LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5); \ - extern void __illegally_sized_syscall_##name##_arg6 (void); \ + extern void __illegally_sized_syscall_arg6 (void); \ if (__builtin_classify_type (__arg6) != 5 && sizeof (__arg6) > 8) \ - __illegally_sized_syscall_##name##_arg6 (); \ + __illegally_sized_syscall_arg6 (); \ r8 = arg6 #define ASM_INPUT_0 "0" (r0) |