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,errnoent,ioctlent,signalent}.h: New files
diff --git a/util.c b/util.c
index 8343e24..a3cde44 100644
--- a/util.c
+++ b/util.c
@@ -1223,10 +1223,13 @@
# elif defined (X86_64)
# define arg0_offset ((long)(8*(current_personality ? RBX : RDI)))
# define arg1_offset ((long)(8*(current_personality ? RCX : RSI)))
+# elif defined (SH)
+# define arg0_offset (4*(REG_REG0+4))
+# define arg1_offset (4*(REG_REG0+5))
# else
# define arg0_offset 0
# define arg1_offset 4
-# if defined SH || defined ARM
+# if defined ARM
# define restore_arg0(tcp, state, val) 0
# endif
# endif