2003-06-26 Roland McGrath <roland@redhat.com>
* configure.ac: SHMEDIA -> SH64 * defs.h: Likewise. * mem.c: Likewise. * process.c: Likewise. * sock.c: Likewise. * syscall.c: Likewise. * util.c: Likewise. * linux/shmedia/syscallent.h: Moved to ... * linux/sh64/syscallent.h: ... here.
This commit is contained in:
parent
5f7ffc563a
commit
f5a477788e
@ -91,9 +91,9 @@ sh)
|
||||
arch=sh
|
||||
AC_DEFINE([SH], 1, [Define for the SH architecture.])
|
||||
;;
|
||||
shmedia)
|
||||
arch=shmedia
|
||||
AC_DEFINE([SHMEDIA], 1, [Define for the SHmedia architecture.])
|
||||
sh64)
|
||||
arch=sh64
|
||||
AC_DEFINE([SH64], 1, [Define for the SH64 architecture.])
|
||||
;;
|
||||
x86?64*)
|
||||
arch=x86_64
|
||||
|
8
defs.h
8
defs.h
@ -170,8 +170,8 @@ extern int ptrace();
|
||||
# define PT_IAOQ0 (106*4)
|
||||
# define PT_IAOQ1 (107*4)
|
||||
#endif /* HPPA */
|
||||
#ifdef SHMEDIA
|
||||
/* SHmedia Linux - this code assumes the following kernel API for system calls:
|
||||
#ifdef SH64
|
||||
/* SH64 Linux - this code assumes the following kernel API for system calls:
|
||||
PC Offset 0
|
||||
System Call Offset 16 (actually, (syscall no.) | (0x1n << 16),
|
||||
where n = no. of parameters.
|
||||
@ -185,7 +185,7 @@ extern int ptrace();
|
||||
# define REG_GENERAL(x) (8*(x)+REG_OFFSET)
|
||||
# define REG_PC (0*8)
|
||||
# define REG_SYSCALL (2*8)
|
||||
#endif /* SHMEDIA */
|
||||
#endif /* SH64 */
|
||||
#endif /* LINUX */
|
||||
|
||||
#define SUPPORTED_PERSONALITIES 1
|
||||
@ -318,7 +318,7 @@ struct tcb {
|
||||
#define TCB_FOLLOWFORK 00400 /* Process should have forks followed */
|
||||
#define TCB_REPRINT 01000 /* We should reprint this syscall on exit */
|
||||
#ifdef LINUX
|
||||
# if defined(ALPHA) || defined(SPARC) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SHMEDIA) || defined(S390) || defined(S390X) || defined(ARM)
|
||||
# if defined(ALPHA) || defined(SPARC) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM)
|
||||
# define TCB_WAITEXECVE 02000 /* ignore SIGTRAP after exceve */
|
||||
# endif
|
||||
# define TCB_CLONE_DETACHED 04000 /* CLONE_DETACHED set in creating syscall */
|
||||
|
6
mem.c
6
mem.c
@ -42,7 +42,7 @@
|
||||
#if defined(LINUX) && defined(I386)
|
||||
#include <asm/ldt.h>
|
||||
#endif
|
||||
#if defined(LINUX) && defined(SHMEDIA)
|
||||
#if defined(LINUX) && defined(SH64)
|
||||
#include <asm/page.h> /* for PAGE_SHIFT */
|
||||
#endif
|
||||
|
||||
@ -227,7 +227,7 @@ struct tcb *tcp;
|
||||
return 0;
|
||||
else
|
||||
u_arg[i] = v;
|
||||
#elif defined(SH) || defined(SHMEDIA)
|
||||
#elif defined(SH) || defined(SH64)
|
||||
/* SH has always passed the args in registers */
|
||||
int i;
|
||||
for (i=0; i<6; i++)
|
||||
@ -245,7 +245,7 @@ int
|
||||
sys_mmap(tcp)
|
||||
struct tcb *tcp;
|
||||
{
|
||||
#if defined(LINUX) && defined(SHMEDIA)
|
||||
#if defined(LINUX) && defined(SH64)
|
||||
/*
|
||||
* Old mmap differs from new mmap in specifying the
|
||||
* offset in units of bytes rather than pages. We
|
||||
|
@ -666,7 +666,7 @@ int new;
|
||||
if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*(REG_REG0+3)), new)<0)
|
||||
return -1;
|
||||
return 0;
|
||||
#elif defined(SHMEDIA)
|
||||
#elif defined(SH64)
|
||||
/* Top half of reg encodes the no. of args n as 0x1n.
|
||||
Assume 0 args as kernel never actually checks... */
|
||||
if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_SYSCALL),
|
||||
@ -2475,7 +2475,7 @@ struct xlat struct_user_offsets[] = {
|
||||
{ 4*REG_XDREG14, "4*REG_XDREG14" },
|
||||
{ 4*REG_FPSCR, "4*REG_FPSCR" },
|
||||
#endif /* SH */
|
||||
#ifdef SHMEDIA
|
||||
#ifdef SH64
|
||||
{ 0, "PC(L)" },
|
||||
{ 4, "PC(U)" },
|
||||
{ 8, "SR(L)" },
|
||||
@ -2663,12 +2663,12 @@ struct xlat struct_user_offsets[] = {
|
||||
{ uoff(u_dsize), "offsetof(struct user, u_dsize)" },
|
||||
{ uoff(u_ssize), "offsetof(struct user, u_ssize)" },
|
||||
{ uoff(start_code), "offsetof(struct user, start_code)" },
|
||||
#ifdef SHMEDIA
|
||||
#ifdef SH64
|
||||
{ uoff(start_data), "offsetof(struct user, start_data)" },
|
||||
#endif
|
||||
{ uoff(start_stack), "offsetof(struct user, start_stack)" },
|
||||
{ uoff(signal), "offsetof(struct user, signal)" },
|
||||
#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SHMEDIA)
|
||||
#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64)
|
||||
{ uoff(reserved), "offsetof(struct user, reserved)" },
|
||||
#endif
|
||||
{ uoff(u_ar0), "offsetof(struct user, u_ar0)" },
|
||||
|
2
sock.c
2
sock.c
@ -35,7 +35,7 @@
|
||||
#include <sys/sockio.h>
|
||||
#endif
|
||||
|
||||
#if defined (ALPHA) || defined(SH) || defined(SHMEDIA)
|
||||
#if defined (ALPHA) || defined(SH) || defined(SH64)
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#elif defined(HAVE_IOCTLS_H)
|
||||
|
18
syscall.c
18
syscall.c
@ -713,7 +713,7 @@ struct tcb *tcp;
|
||||
static long r28;
|
||||
#elif defined(SH)
|
||||
static long r0;
|
||||
#elif defined(SHMEDIA)
|
||||
#elif defined(SH64)
|
||||
static long r9;
|
||||
#elif defined(X86_64)
|
||||
static long rax;
|
||||
@ -1144,7 +1144,7 @@ struct tcb *tcp;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#elif defined(SHMEDIA)
|
||||
#elif defined(SH64)
|
||||
if (upeek(pid, REG_SYSCALL, &scno) < 0)
|
||||
return -1;
|
||||
scno &= 0xFFFF;
|
||||
@ -1156,7 +1156,7 @@ struct tcb *tcp;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif /* SHMEDIA */
|
||||
#endif /* SH64 */
|
||||
#endif /* LINUX */
|
||||
#ifdef SUNOS4
|
||||
if (upeek(pid, uoff(u_arg[7]), &scno) < 0)
|
||||
@ -1165,7 +1165,7 @@ struct tcb *tcp;
|
||||
/* new syscall ABI returns result in R0 */
|
||||
if (upeek(pid, 4*REG_REG0, (long *)&r0) < 0)
|
||||
return -1;
|
||||
#elif defined(SHMEDIA)
|
||||
#elif defined(SH64)
|
||||
/* ABI defines result returned in r9 */
|
||||
if (upeek(pid, REG_GENERAL(9), (long *)&r9) < 0)
|
||||
return -1;
|
||||
@ -1481,7 +1481,7 @@ struct tcb *tcp;
|
||||
u_error = 0;
|
||||
}
|
||||
#else
|
||||
#ifdef SHMEDIA
|
||||
#ifdef SH64
|
||||
/* interpret result as return value or error number */
|
||||
if (r9 && (unsigned) -r9 < nerrnos) {
|
||||
tcp->u_rval = -1;
|
||||
@ -1491,7 +1491,7 @@ struct tcb *tcp;
|
||||
tcp->u_rval = r9;
|
||||
u_error = 0;
|
||||
}
|
||||
#endif /* SHMEDIA */
|
||||
#endif /* SH64 */
|
||||
#endif /* SH */
|
||||
#endif /* HPPA */
|
||||
#endif /* SPARC */
|
||||
@ -1699,11 +1699,11 @@ force_result(tcp, error, rval)
|
||||
if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*REG_REG0), r0) < 0)
|
||||
return -1;
|
||||
#else
|
||||
#ifdef SHMEDIA
|
||||
#ifdef SH64
|
||||
r9 = error ? -error : rval;
|
||||
if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)REG_GENERAL(9), r9) < 0)
|
||||
return -1;
|
||||
#endif /* SHMEDIA */
|
||||
#endif /* SH64 */
|
||||
#endif /* SH */
|
||||
#endif /* HPPA */
|
||||
#endif /* SPARC */
|
||||
@ -1934,7 +1934,7 @@ struct tcb *tcp;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#elif defined(SHMEDIA)
|
||||
#elif defined(SH64)
|
||||
{
|
||||
int i;
|
||||
/* Registers used by SH5 Linux system calls for parameters */
|
||||
|
6
util.c
6
util.c
@ -974,7 +974,7 @@ struct tcb *tcp;
|
||||
#elif defined(SH)
|
||||
if (upeek(tcp->pid, 4*REG_PC ,&pc) < 0)
|
||||
return -1;
|
||||
#elif defined(SHMEDIA)
|
||||
#elif defined(SH64)
|
||||
if (upeek(tcp->pid, REG_PC ,&pc) < 0)
|
||||
return -1;
|
||||
#endif
|
||||
@ -1092,7 +1092,7 @@ struct tcb *tcp;
|
||||
return;
|
||||
}
|
||||
tprintf("[%08lx] ", pc);
|
||||
#elif defined(SHMEDIA)
|
||||
#elif defined(SH64)
|
||||
long pc;
|
||||
|
||||
if (upeek(tcp->pid, REG_PC, &pc) < 0) {
|
||||
@ -1245,7 +1245,7 @@ typedef struct regs arg_setup_state;
|
||||
# elif defined (SH)
|
||||
# define arg0_offset (4*(REG_REG0+4))
|
||||
# define arg1_offset (4*(REG_REG0+5))
|
||||
# elif defined (SHMEDIA)
|
||||
# elif defined (SH64)
|
||||
/* ABI defines arg0 & 1 in r2 & r3 */
|
||||
# define arg0_offset (REG_OFFSET+16)
|
||||
# define arg1_offset (REG_OFFSET+24)
|
||||
|
Loading…
x
Reference in New Issue
Block a user