mips: fix pipe syscall decoding

* linux/mips/arch_getrval2.c: New file.
* Makefile.am (EXTRA_DIST): Add it.
* defs.h [MIPS] (HAVE_GETRVAL2): Define.
This commit is contained in:
Дмитрий Левин 2015-03-23 23:14:08 +00:00
parent a3c483545a
commit 8e8d7d219e
3 changed files with 8 additions and 1 deletions

View File

@ -319,6 +319,7 @@ EXTRA_DIST = \
linux/microblaze/print_pc.c \
linux/microblaze/syscallent.h \
linux/microblaze/userent.h \
linux/mips/arch_getrval2.c \
linux/mips/arch_regs.c \
linux/mips/arch_regs.h \
linux/mips/arch_sigreturn.c \

3
defs.h
View File

@ -425,7 +425,8 @@ extern int umoven(struct tcb *, long, unsigned int, void *);
extern int umovestr(struct tcb *, long, unsigned int, char *);
extern int upeek(int pid, long, long *);
#if defined ALPHA || defined IA64 || defined SH || defined SPARC || defined SPARC64
#if defined ALPHA || defined IA64 || defined MIPS \
|| defined SH || defined SPARC || defined SPARC64
# define HAVE_GETRVAL2
extern long getrval2(struct tcb *);
#else

View File

@ -0,0 +1,5 @@
long
getrval2(struct tcb *tcp)
{
return mips_regs.uregs[3];
}