2007-08-26 Daniel Jacobowitz <dan@codesourcery.com>
* defs.h [MIPS]: Include <sgidefs.h>.
(MAX_QUALS): Update for MIPS.
(LINUX_MIPSO32, LINUX_MIPSN32, LINUX_MIPSN64, LINUX_MIPS64): Define.
(struct tcb): Add ext_arg for MIPS N32.
(TCB_WAITEXECVE): Define for MIPS.
(ALIGN64): Use LINUX_MIPSO32.
* file.c (sys_lseek): Use ext_arg for MIPS N32.
(sys_readahead, sys_fadvise64_64): Likewise.
* io.c (sys_pread64, sys_pwrite64): Likewise.
* mem.c (print_mmap): Take OFFSET argument.
(sys_old_mmap): Update call to print_mmap.
(sys_mmap): Use ext_arg for MIPS N32.
* process.c (struct_user_offsets): Add MIPS registers.
* signal.c (sys_sigreturn): Handle MIPS N32 and MIPS N64. Correct
MIPS O32 call to sprintsigmask.
* syscall.c (internal_syscall): Handle MIPS N32. Check for
TCB_WAITEXECVE on MIPS.
(force_result): Add a comment about MIPS N32.
(syscall_enter): Handle MIPS N32 and MIPS N64.
* linux/syscall.h (sys_pread64, sys_pwrite64): Declare.
* linux/mips/syscallent.h: Include "dummy.h". Handle alternate
MIPS ABIs.
diff --git a/process.c b/process.c
index 3fb37ec..6312213 100644
--- a/process.c
+++ b/process.c
@@ -2925,6 +2925,80 @@
{ uoff(regs.ARM_cpsr), "cpsr" },
#endif
+#ifdef MIPS
+ { 0, "r0" },
+ { 1, "r1" },
+ { 2, "r2" },
+ { 3, "r3" },
+ { 4, "r4" },
+ { 5, "r5" },
+ { 6, "r6" },
+ { 7, "r7" },
+ { 8, "r8" },
+ { 9, "r9" },
+ { 10, "r10" },
+ { 11, "r11" },
+ { 12, "r12" },
+ { 13, "r13" },
+ { 14, "r14" },
+ { 15, "r15" },
+ { 16, "r16" },
+ { 17, "r17" },
+ { 18, "r18" },
+ { 19, "r19" },
+ { 20, "r20" },
+ { 21, "r21" },
+ { 22, "r22" },
+ { 23, "r23" },
+ { 24, "r24" },
+ { 25, "r25" },
+ { 26, "r26" },
+ { 27, "r27" },
+ { 28, "r28" },
+ { 29, "r29" },
+ { 30, "r30" },
+ { 31, "r31" },
+ { 32, "f0" },
+ { 33, "f1" },
+ { 34, "f2" },
+ { 35, "f3" },
+ { 36, "f4" },
+ { 37, "f5" },
+ { 38, "f6" },
+ { 39, "f7" },
+ { 40, "f8" },
+ { 41, "f9" },
+ { 42, "f10" },
+ { 43, "f11" },
+ { 44, "f12" },
+ { 45, "f13" },
+ { 46, "f14" },
+ { 47, "f15" },
+ { 48, "f16" },
+ { 49, "f17" },
+ { 50, "f18" },
+ { 51, "f19" },
+ { 52, "f20" },
+ { 53, "f21" },
+ { 54, "f22" },
+ { 55, "f23" },
+ { 56, "f24" },
+ { 57, "f25" },
+ { 58, "f26" },
+ { 59, "f27" },
+ { 60, "f28" },
+ { 61, "f29" },
+ { 62, "f30" },
+ { 63, "f31" },
+ { 64, "pc" },
+ { 65, "cause" },
+ { 66, "badvaddr" },
+ { 67, "mmhi" },
+ { 68, "mmlo" },
+ { 69, "fpcsr" },
+ { 70, "fpeir" },
+#endif
+
#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64)
{ uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" },
#endif