linux/ia64/userent.h \
linux/inet_diag.h \
linux/m68k/arch_regs.c \
+ linux/m68k/arch_regs.h \
linux/m68k/arch_sigreturn.c \
linux/m68k/get_error.c \
linux/m68k/get_scno.c \
linux/m68k/get_syscall_args.c \
- linux/m68k/get_syscall_result.c \
linux/m68k/ioctls_arch0.h \
linux/m68k/ioctls_inc0.h \
linux/m68k/syscallent.h \
-static long m68k_d0;
-#define ARCH_PC_PEEK_ADDR (4 * PT_PC)
+static struct user_regs_struct m68k_regs;
+long *const m68k_usp_ptr = &m68k_regs.usp;
+#define ARCH_PC_REG m68k_regs.pc
+#define ARCH_REGS_FOR_GETREGS m68k_regs
--- /dev/null
+extern long *const m68k_usp_ptr;
{
long addr;
- if (upeek(tcp->pid, 4*PT_USP, &addr) < 0)
- return;
/* Fetch pointer to struct sigcontext. */
- if (umove(tcp, addr + 2 * sizeof(int), &addr) < 0)
+ if (umove(tcp, *m68k_usp_ptr + 2 * sizeof(int), &addr) < 0)
return;
unsigned long mask[NSIG / 8 / sizeof(long)];
static void
get_error(struct tcb *tcp, const bool check_errno)
{
- if (check_errno && is_negated_errno(m68k_d0)) {
+ if (check_errno && is_negated_errno(m68k_regs.d0)) {
tcp->u_rval = -1;
- tcp->u_error = -m68k_d0;
+ tcp->u_error = -m68k_regs.d0;
} else {
- tcp->u_rval = m68k_d0;
+ tcp->u_rval = m68k_regs.d0;
}
}
static int
arch_get_scno(struct tcb *tcp)
{
- return upeek(tcp->pid, 4 * PT_ORIG_D0, &tcp->scno) < 0 ? -1 : 1;
+ tcp->scno = m68k_regs.orig_d0;
+ return 1;
}
static int
get_syscall_args(struct tcb *tcp)
{
- unsigned int i;
-
- for (i = 0; i < tcp->s_ent->nargs; ++i)
- if (upeek(tcp->pid, (i < 5 ? i : i + 2)*4, &tcp->u_arg[i]) < 0)
- return -1;
+ tcp->u_arg[0] = m68k_regs.d1;
+ tcp->u_arg[1] = m68k_regs.d2;
+ tcp->u_arg[2] = m68k_regs.d3;
+ tcp->u_arg[3] = m68k_regs.d4;
+ tcp->u_arg[4] = m68k_regs.d5;
+ tcp->u_arg[5] = m68k_regs.a0;
return 1;
}
+++ /dev/null
-static int
-get_syscall_result_regs(struct tcb *tcp)
-{
- return upeek(tcp->pid, 4 * PT_D0, &m68k_d0) < 0 ? -1 : 0;
-}