Move sparc64 get_scno() code where it belongs
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
parent
588a90f0f0
commit
b6ef71b6f4
@ -1,21 +1 @@
|
||||
#ifdef SPARC64
|
||||
/* Retrieve the syscall trap instruction. */
|
||||
unsigned long trap;
|
||||
errno = 0;
|
||||
trap = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)sparc_regs.tpc, 0);
|
||||
if (errno)
|
||||
return -1;
|
||||
trap >>= 32;
|
||||
switch (trap) {
|
||||
case 0x91d02010:
|
||||
/* Linux/SPARC syscall trap. */
|
||||
update_personality(tcp, 0);
|
||||
break;
|
||||
case 0x91d0206d:
|
||||
/* Linux/SPARC64 syscall trap. */
|
||||
update_personality(tcp, 1);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
scno = sparc_regs.u_regs[U_REG_G1];
|
||||
|
@ -1 +1,19 @@
|
||||
#include "sparc/get_scno.c"
|
||||
/* Retrieve the syscall trap instruction. */
|
||||
unsigned long trap;
|
||||
errno = 0;
|
||||
trap = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)sparc_regs.tpc, 0);
|
||||
if (errno)
|
||||
return -1;
|
||||
trap >>= 32;
|
||||
switch (trap) {
|
||||
case 0x91d02010:
|
||||
/* Linux/SPARC syscall trap. */
|
||||
update_personality(tcp, 0);
|
||||
break;
|
||||
case 0x91d0206d:
|
||||
/* Linux/SPARC64 syscall trap. */
|
||||
update_personality(tcp, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
scno = sparc_regs.u_regs[U_REG_G1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user