]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Support sys_spu_run and sys_spu_create on ppc32-linux. Patch by
authorJulian Seward <jseward@acm.org>
Wed, 5 Nov 2008 11:36:59 +0000 (11:36 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 5 Nov 2008 11:36:59 +0000 (11:36 +0000)
Kenneth Skovhede.  Fixes #167288.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8731

coregrind/m_syswrap/syswrap-ppc32-linux.c

index 2eec9a2020254b091d0ebd281e8100e7fb0329c0..3366dc655df13a6785d40efa916a0c29c81e3cda 100644 (file)
@@ -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