From: Julian Seward Date: Wed, 5 Nov 2008 11:36:59 +0000 (+0000) Subject: Support sys_spu_run and sys_spu_create on ppc32-linux. Patch by X-Git-Tag: svn/VALGRIND_3_4_0~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af77aae9cd692bad9551ea13765158bcbbc2b4d0;p=thirdparty%2Fvalgrind.git Support sys_spu_run and sys_spu_create on ppc32-linux. Patch by Kenneth Skovhede. Fixes #167288. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8731 --- diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index 2eec9a2020..3366dc655d 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -406,6 +406,8 @@ DECL_TEMPLATE(ppc32_linux, sys_sigreturn); DECL_TEMPLATE(ppc32_linux, sys_rt_sigreturn); DECL_TEMPLATE(ppc32_linux, sys_sigaction); DECL_TEMPLATE(ppc32_linux, sys_sigsuspend); +DECL_TEMPLATE(ppc32_linux, sys_spu_create); +DECL_TEMPLATE(ppc32_linux, sys_spu_run); PRE(sys_socketcall) { @@ -1449,6 +1451,27 @@ PRE(sys_sigsuspend) PRE_REG_READ1(int, "sigsuspend", vki_old_sigset_t, mask); } +PRE(sys_spu_create) +{ + PRE_MEM_RASCIIZ("stat64(filename)", ARG1); +} +POST(sys_spu_create) +{ + vg_assert(SUCCESS); +} + +PRE(sys_spu_run) +{ + *flags |= SfMayBlock; + if (ARG2 != NULL) + PRE_MEM_WRITE("npc", ARG2, sizeof(unsigned int)); + PRE_MEM_READ("event", ARG3, sizeof(unsigned int)); +} +POST(sys_spu_run) +{ + if (ARG2 != NULL) + POST_MEM_WRITE(ARG2, sizeof(unsigned int)); +} #undef PRE #undef POST @@ -1806,6 +1829,8 @@ const SyscallTableEntry ML_(syscall_table)[] = { LINX_(__NR_inotify_init, sys_inotify_init), // 275 LINX_(__NR_inotify_add_watch, sys_inotify_add_watch), // 276 LINX_(__NR_inotify_rm_watch, sys_inotify_rm_watch), // 277 + PLAXY(__NR_spu_run, sys_spu_run), // 278 + PLAX_(__NR_spu_create, sys_spu_create), // 279 LINXY(__NR_openat, sys_openat), // 286 LINX_(__NR_mkdirat, sys_mkdirat), // 287