diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-04-28 01:09:25 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-04-28 01:09:25 +0000 |
commit | b9ba7aeb165cffecdffb60aec8c3fa8d590d9ca9 (patch) | |
tree | 42d07b0c7246ae2536a702e7c5de9e2732341116 /include/asm-sh/unistd.h | |
parent | 7406b0a326f2d70ade2671c37d1beef62249db97 (diff) |
Merge with 2.3.99-pre6.
Diffstat (limited to 'include/asm-sh/unistd.h')
-rw-r--r-- | include/asm-sh/unistd.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h index baaff1798..f927716b2 100644 --- a/include/asm-sh/unistd.h +++ b/include/asm-sh/unistd.h @@ -248,8 +248,8 @@ do { \ #define _syscall0(type,name) \ type name(void) \ { \ -register long __sc0 __asm__ ("$r0") = __NR_##name; \ -__asm__ __volatile__ ("trapa #0" \ +register long __sc0 __asm__ ("$r3") = __NR_##name; \ +__asm__ __volatile__ ("trapa #0x10" \ : "=z" (__sc0) \ : "0" (__sc0) \ : "memory" ); \ @@ -259,9 +259,9 @@ __syscall_return(type,__sc0); \ #define _syscall1(type,name,type1,arg1) \ type name(type1 arg1) \ { \ -register long __sc0 __asm__ ("$r0") = __NR_##name; \ +register long __sc0 __asm__ ("$r3") = __NR_##name; \ register long __sc4 __asm__ ("$r4") = (long) arg1; \ -__asm__ __volatile__ ("trapa #0" \ +__asm__ __volatile__ ("trapa #0x11" \ : "=z" (__sc0) \ : "0" (__sc0), "r" (__sc4) \ : "memory"); \ @@ -271,10 +271,10 @@ __syscall_return(type,__sc0); \ #define _syscall2(type,name,type1,arg1,type2,arg2) \ type name(type1 arg1,type2 arg2) \ { \ -register long __sc0 __asm__ ("$r0") = __NR_##name; \ +register long __sc0 __asm__ ("$r3") = __NR_##name; \ register long __sc4 __asm__ ("$r4") = (long) arg1; \ register long __sc5 __asm__ ("$r5") = (long) arg2; \ -__asm__ __volatile__ ("trapa #0" \ +__asm__ __volatile__ ("trapa #0x12" \ : "=z" (__sc0) \ : "0" (__sc0), "r" (__sc4), "r" (__sc5) \ : "memory"); \ @@ -284,11 +284,11 @@ __syscall_return(type,__sc0); \ #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ type name(type1 arg1,type2 arg2,type3 arg3) \ { \ -register long __sc0 __asm__ ("$r0") = __NR_##name; \ +register long __sc0 __asm__ ("$r3") = __NR_##name; \ register long __sc4 __asm__ ("$r4") = (long) arg1; \ register long __sc5 __asm__ ("$r5") = (long) arg2; \ register long __sc6 __asm__ ("$r6") = (long) arg3; \ -__asm__ __volatile__ ("trapa #0" \ +__asm__ __volatile__ ("trapa #0x13" \ : "=z" (__sc0) \ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) \ : "memory"); \ @@ -298,12 +298,12 @@ __syscall_return(type,__sc0); \ #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ { \ -register long __sc0 __asm__ ("$r0") = __NR_##name; \ +register long __sc0 __asm__ ("$r3") = __NR_##name; \ register long __sc4 __asm__ ("$r4") = (long) arg1; \ register long __sc5 __asm__ ("$r5") = (long) arg2; \ register long __sc6 __asm__ ("$r6") = (long) arg3; \ register long __sc7 __asm__ ("$r7") = (long) arg4; \ -__asm__ __volatile__ ("trapa #0" \ +__asm__ __volatile__ ("trapa #0x14" \ : "=z" (__sc0) \ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), \ "r" (__sc7) \ @@ -314,16 +314,16 @@ __syscall_return(type,__sc0); \ #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ { \ -register long __sc0 __asm__ ("$r0") = __NR_##name; \ +register long __sc0 __asm__ ("$r3") = __NR_##name; \ register long __sc4 __asm__ ("$r4") = (long) arg1; \ register long __sc5 __asm__ ("$r5") = (long) arg2; \ register long __sc6 __asm__ ("$r6") = (long) arg3; \ register long __sc7 __asm__ ("$r7") = (long) arg4; \ -__asm__ __volatile__ ("mov.l %2, @-$r15\n\t" \ - "trapa #0" \ +register long __sc2 __asm__ ("$r0") = (long) arg5; \ +__asm__ __volatile__ ("trapa #0x15" \ : "=z" (__sc0) \ - : "0" (__sc0), "r" (arg5), \ - "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7) \ + : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \ + "r" (__sc7), "r" (__sc2) \ : "memory" ); \ __syscall_return(type,__sc0); \ } |