patch-2.4.4 linux/include/asm-cris/unistd.h
Next file: linux/include/asm-i386/atomic.h
Previous file: linux/include/asm-cris/termios.h
Back to the patch index
Back to the overall index
- Lines: 132
- Date:
Fri Apr 6 10:51:19 2001
- Orig file:
v2.4.3/linux/include/asm-cris/unistd.h
- Orig date:
Thu Feb 8 16:32:44 2001
diff -u --recursive --new-file v2.4.3/linux/include/asm-cris/unistd.h linux/include/asm-cris/unistd.h
@@ -233,28 +233,28 @@
type name(void) \
{ \
register long __a __asm__ ("r10"); \
- __asm__ __volatile__ ("move.d %1,r1\n\tbreak 13" \
+ __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \
: "=r" (__a) \
: "g" (__NR_##name) \
- : "r10", "r1"); \
+ : "r10", "r9"); \
if(__a >= 0) \
return (type) __a; \
errno = -__a; \
- return -1; \
+ return (type) -1; \
}
#define _syscall1(type,name,type1,arg1) \
type name(type1 arg1) \
{ \
register long __a __asm__ ("r10") = (long) arg1; \
- __asm__ __volatile__ ("move.d %1,r1\n\tbreak 13" \
+ __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \
: "=r" (__a) \
: "g" (__NR_##name), "0" (__a) \
- : "r10", "r1"); \
+ : "r10", "r9"); \
if(__a >= 0) \
return (type) __a; \
errno = -__a; \
- return -1; \
+ return (type) -1; \
}
#define _syscall2(type,name,type1,arg1,type2,arg2) \
@@ -262,14 +262,14 @@
{ \
register long __a __asm__ ("r10") = (long) arg1; \
register long __b __asm__ ("r11") = (long) arg2; \
- __asm__ __volatile__ ("move.d %1,r1\n\tbreak 13" \
+ __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \
: "=r" (__a) \
: "g" (__NR_##name), "0" (__a), "r" (__b) \
- : "r10", "r1"); \
+ : "r10", "r9"); \
if(__a >= 0) \
return (type) __a; \
errno = -__a; \
- return -1; \
+ return (type) -1; \
}
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
@@ -278,14 +278,14 @@
register long __a __asm__ ("r10") = (long) arg1; \
register long __b __asm__ ("r11") = (long) arg2; \
register long __c __asm__ ("r12") = (long) arg3; \
- __asm__ __volatile__ ("move.d %1,r1\n\tbreak 13" \
+ __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \
: "=r" (__a) \
: "g" (__NR_##name), "0" (__a), "r" (__b), "r" (__c) \
- : "r10", "r1"); \
+ : "r10", "r9"); \
if(__a >= 0) \
return (type) __a; \
errno = -__a; \
- return -1; \
+ return (type) -1; \
}
#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
@@ -295,15 +295,15 @@
register long __b __asm__ ("r11") = (long) arg2; \
register long __c __asm__ ("r12") = (long) arg3; \
register long __d __asm__ ("r13") = (long) arg4; \
- __asm__ __volatile__ ("move.d %1,r1\n\tbreak 13" \
+ __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \
: "=r" (__a) \
: "g" (__NR_##name), "0" (__a), "r" (__b), \
"r" (__c), "r" (__d) \
- : "r10", "r1"); \
+ : "r10", "r9"); \
if(__a >= 0) \
return (type) __a; \
errno = -__a; \
- return -1; \
+ return (type) -1; \
}
#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
@@ -314,16 +314,36 @@
register long __b __asm__ ("r11") = (long) arg2; \
register long __c __asm__ ("r12") = (long) arg3; \
register long __d __asm__ ("r13") = (long) arg4; \
- register long __e __asm__ ("r0") = (long) arg5; \
- __asm__ __volatile__ ("move.d %1,r1\n\tbreak 13" \
+ __asm__ __volatile__ ("move %6,$mof\n\t" \
+ "movu.w %1,$r9\n\tbreak 13" \
: "=r" (__a) \
: "g" (__NR_##name), "0" (__a), "r" (__b), \
- "r" (__c), "r" (__d), "r" (__e) \
- : "r10", "r1"); \
+ "r" (__c), "r" (__d), "g" (arg5) \
+ : "r10", "r9"); \
if(__a >= 0) \
return (type) __a; \
errno = -__a; \
- return -1; \
+ return (type) -1; \
+}
+
+#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
+ type5,arg5,type6,arg6) \
+type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
+{ \
+ register long __a __asm__ ("r10") = (long) arg1; \
+ register long __b __asm__ ("r11") = (long) arg2; \
+ register long __c __asm__ ("r12") = (long) arg3; \
+ register long __d __asm__ ("r13") = (long) arg4; \
+ __asm__ __volatile__ ("move %6,$mof\n\tmove %7,$srp\n\t" \
+ "movu.w %1,$r9\n\tbreak 13" \
+ : "=r" (__a) \
+ : "g" (__NR_##name), "0" (__a), "r" (__b), \
+ "r" (__c), "r" (__d), "g" (arg5), "g" (arg6)\
+ : "r10", "r9", "srp"); \
+ if(__a >= 0) \
+ return (type) __a; \
+ errno = -__a; \
+ return (type) -1; \
}
#ifdef __KERNEL_SYSCALLS__
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)