2003-02-26 Stuart Menefy <stuart.menefy@st.com>
Various fixes for SuperH [SH]:
* mem.c (sys_old_mmap): mmap() parameters passed in registers
* net.c (sys_pipe), syscall.c (getrval2): pipe() results returned
in registers
* process.c (change_syscall): Fixed register which holds system
call number
* util.c (arg0_offset, arg1_offset): provide definition
* Makefile.am: Added new files in linux/sh
* linux/sh/syscallent.h: New file.
* linux/sh/errnoent.h: New file.
* linux/sh/ioctlent.h: New file.
* linux/sh/signalent.h: New file.
diff --git a/mem.c b/mem.c
index 7f9c8d7..f8cc09d 100644
--- a/mem.c
+++ b/mem.c
@@ -222,7 +222,12 @@
return 0;
else
u_arg[i] = v;
-#else // defined(IA64)
+#elif defined(SH)
+ /* SH has always passed the args in registers */
+ int i;
+ for (i=0; i<6; i++)
+ u_arg[i] = tcp->u_arg[i];
+#else
if (umoven(tcp, tcp->u_arg[0], sizeof u_arg, (char *) u_arg) == -1)
return 0;
#endif // defined(IA64)