Dmitry V. Levin
d70d1c4aa6
Split code that use arch-specific registers to separate arch files. * syscall.c: Move definitions of variables containing fetched registers to linux/*/arch_regs.c files. [HAVE_GETRVAL2] (getrval2): Move arch-specific code to linux/*/arch_getrval2.c, include "arch_getrval2.c". (print_pc): Move arch-specific code to linux/*/print_pc.c files, include "print_pc.c". [X86_64] (x86_64_getregs_old): Rename to getregs_old, move to linux/x86_64/getregs_old.c, include "getregs_old.c". [POWERPC] (powerpc_getregs_old): Rename to getregs_old, move to linux/powerpc/getregs_old.c, include "getregs_old.c". (get_regs) [X86_64, POWERPC]: Update callers. (get_scno): Move arch-specific code to linux/*/get_scno.c, include "get_scno.c". (get_syscall_args): Move arch-specific code to linux/*/get_syscall_args.c, include "get_syscall_args.c". (get_error): Move arch-specific code to linux/*/get_error.c, include "get_error.c". (get_syscall_result): Move arch-specific code to linux/*/get_syscall_result.c, include "get_syscall_result.c". * Makefile.am (EXTRA_DIST): Add new linux/*/*.c files.
28 lines
864 B
C
28 lines
864 B
C
#if defined LINUX_MIPSN64
|
|
tcp->u_arg[0] = mips_REG_A0;
|
|
tcp->u_arg[1] = mips_REG_A1;
|
|
tcp->u_arg[2] = mips_REG_A2;
|
|
tcp->u_arg[3] = mips_REG_A3;
|
|
tcp->u_arg[4] = mips_REG_A4;
|
|
tcp->u_arg[5] = mips_REG_A5;
|
|
#elif defined LINUX_MIPSN32
|
|
tcp->u_arg[0] = tcp->ext_arg[0] = mips_REG_A0;
|
|
tcp->u_arg[1] = tcp->ext_arg[1] = mips_REG_A1;
|
|
tcp->u_arg[2] = tcp->ext_arg[2] = mips_REG_A2;
|
|
tcp->u_arg[3] = tcp->ext_arg[3] = mips_REG_A3;
|
|
tcp->u_arg[4] = tcp->ext_arg[4] = mips_REG_A4;
|
|
tcp->u_arg[5] = tcp->ext_arg[5] = mips_REG_A5;
|
|
#elif defined LINUX_MIPSO32
|
|
tcp->u_arg[0] = mips_REG_A0;
|
|
tcp->u_arg[1] = mips_REG_A1;
|
|
tcp->u_arg[2] = mips_REG_A2;
|
|
tcp->u_arg[3] = mips_REG_A3;
|
|
if (tcp->s_ent->nargs > 4) {
|
|
umoven(tcp, mips_REG_SP + 4 * 4,
|
|
(tcp->s_ent->nargs - 4) * sizeof(tcp->u_arg[0]),
|
|
&tcp->u_arg[4]);
|
|
}
|
|
#else
|
|
# error unsupported mips abi
|
|
#endif
|