Dmitry V. Levin
c37173f76d
Let native 64-bit personality be personality 0, and 32-bit personality be personality 1, to follow the traditional layout used for other architectures. * defs.h [AARCH64]: Swap PERSONALITY0_WORDSIZE and PERSONALITY1_WORDSIZE, remove DEFAULT_PERSONALITY. [AARCH64 && HAVE_M32_MPERS]: Rename PERSONALITY1_* to PERSONALITY0_*. * file.c [AARCH64 || defined X86_64 || defined X32]: Define STAT32_PERSONALITY for AARCH64 as well. * syscall.c (update_personality) [AARCH64]: Adjust PERSONALITY_NAMES. * linux/aarch64/errnoent1.h: Adjust comment. * linux/aarch64/get_error.c (get_error): Adjust tcp->currpers check. * linux/aarch64/get_syscall_args.c (get_syscall_args): Likewise. * linux/arm/arch_sigreturn.c (arch_sigreturn) [AARCH64]: Likewise. * linux/aarch64/get_scno.c (arch_get_scno): Adjust update_personality invocations. * linux/aarch64/ioctls_arch0.h: Swap with ... * linux/aarch64/ioctls_arch1.h: ... this file. * linux/aarch64/ioctls_inc0.h: Swap with ... * linux/aarch64/ioctls_inc1.h: ... this file. * linux/aarch64/syscallent.h: Swap with ... * linux/aarch64/syscallent1.h: ... this file.
19 lines
513 B
C
19 lines
513 B
C
#define get_syscall_args arm_get_syscall_args
|
|
#include "arm/get_syscall_args.c"
|
|
#undef get_syscall_args
|
|
|
|
/* Return -1 on error or 1 on success (never 0!). */
|
|
static int
|
|
get_syscall_args(struct tcb *tcp)
|
|
{
|
|
if (tcp->currpers == 1)
|
|
return arm_get_syscall_args(tcp);
|
|
tcp->u_arg[0] = aarch64_regs.regs[0];
|
|
tcp->u_arg[1] = aarch64_regs.regs[1];
|
|
tcp->u_arg[2] = aarch64_regs.regs[2];
|
|
tcp->u_arg[3] = aarch64_regs.regs[3];
|
|
tcp->u_arg[4] = aarch64_regs.regs[4];
|
|
tcp->u_arg[5] = aarch64_regs.regs[5];
|
|
return 1;
|
|
}
|