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.
18 lines
300 B
C
18 lines
300 B
C
unsigned int currpers;
|
|
|
|
scno = tile_regs.regs[10];
|
|
|
|
#ifdef __tilepro__
|
|
currpers = 1;
|
|
#else
|
|
# ifndef PT_FLAGS_COMPAT
|
|
# define PT_FLAGS_COMPAT 0x10000 /* from Linux 3.8 on */
|
|
# endif
|
|
if (tile_regs.flags & PT_FLAGS_COMPAT)
|
|
currpers = 1;
|
|
else
|
|
currpers = 0;
|
|
#endif
|
|
|
|
update_personality(tcp, currpers);
|