]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add TILEGX arch. specific syscall #245, __NR_cacheflush
authorZhi-Gang Liu <zliu@tilera.com>
Wed, 15 Apr 2015 03:22:17 +0000 (03:22 +0000)
committerZhi-Gang Liu <zliu@tilera.com>
Wed, 15 Apr 2015 03:22:17 +0000 (03:22 +0000)
By:Zhi-Gang Liu

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

coregrind/m_syswrap/syswrap-tilegx-linux.c
include/vki/vki-scnums-tilegx-linux.h

index 28ee5df886c32c761d64a4a985a9e8ba5ceede22..5d6d8766e6997e2afae65f51efe74ce107179f5c 100644 (file)
@@ -474,43 +474,44 @@ SysRes sys_set_tls ( ThreadId tid, Addr tlsptr )
    aren't visible outside this file, but that requires even more macro
    magic. */
 
-DECL_TEMPLATE(tilegx_linux, sys_clone);
-DECL_TEMPLATE(tilegx_linux, sys_rt_sigreturn);
-DECL_TEMPLATE(tilegx_linux, sys_socket);
-DECL_TEMPLATE(tilegx_linux, sys_setsockopt);
-DECL_TEMPLATE(tilegx_linux, sys_getsockopt);
-DECL_TEMPLATE(tilegx_linux, sys_connect);
-DECL_TEMPLATE(tilegx_linux, sys_accept);
-DECL_TEMPLATE(tilegx_linux, sys_accept4);
-DECL_TEMPLATE(tilegx_linux, sys_sendto);
-DECL_TEMPLATE(tilegx_linux, sys_recvfrom);
-DECL_TEMPLATE(tilegx_linux, sys_sendmsg);
-DECL_TEMPLATE(tilegx_linux, sys_recvmsg);
-DECL_TEMPLATE(tilegx_linux, sys_shutdown);
-DECL_TEMPLATE(tilegx_linux, sys_bind);
-DECL_TEMPLATE(tilegx_linux, sys_listen);
-DECL_TEMPLATE(tilegx_linux, sys_getsockname);
-DECL_TEMPLATE(tilegx_linux, sys_getpeername);
-DECL_TEMPLATE(tilegx_linux, sys_socketpair);
-DECL_TEMPLATE(tilegx_linux, sys_semget);
-DECL_TEMPLATE(tilegx_linux, sys_semop);
-DECL_TEMPLATE(tilegx_linux, sys_semtimedop);
-DECL_TEMPLATE(tilegx_linux, sys_semctl);
-DECL_TEMPLATE(tilegx_linux, sys_msgget);
-DECL_TEMPLATE(tilegx_linux, sys_msgrcv);
-DECL_TEMPLATE(tilegx_linux, sys_msgsnd);
-DECL_TEMPLATE(tilegx_linux, sys_msgctl);
-DECL_TEMPLATE(tilegx_linux, sys_shmget);
-DECL_TEMPLATE(tilegx_linux, wrap_sys_shmat);
-DECL_TEMPLATE(tilegx_linux, sys_shmdt);
-DECL_TEMPLATE(tilegx_linux, sys_shmdt);
-DECL_TEMPLATE(tilegx_linux, sys_shmctl);
-DECL_TEMPLATE(tilegx_linux, sys_arch_prctl);
-DECL_TEMPLATE(tilegx_linux, sys_ptrace);
-DECL_TEMPLATE(tilegx_linux, sys_fadvise64);
-DECL_TEMPLATE(tilegx_linux, sys_mmap);
-DECL_TEMPLATE(tilegx_linux, sys_syscall184);
-DECL_TEMPLATE(tilegx_linux, sys_set_dataplane);
+DECL_TEMPLATE (tilegx_linux, sys_clone);
+DECL_TEMPLATE (tilegx_linux, sys_rt_sigreturn);
+DECL_TEMPLATE (tilegx_linux, sys_socket);
+DECL_TEMPLATE (tilegx_linux, sys_setsockopt);
+DECL_TEMPLATE (tilegx_linux, sys_getsockopt);
+DECL_TEMPLATE (tilegx_linux, sys_connect);
+DECL_TEMPLATE (tilegx_linux, sys_accept);
+DECL_TEMPLATE (tilegx_linux, sys_accept4);
+DECL_TEMPLATE (tilegx_linux, sys_sendto);
+DECL_TEMPLATE (tilegx_linux, sys_recvfrom);
+DECL_TEMPLATE (tilegx_linux, sys_sendmsg);
+DECL_TEMPLATE (tilegx_linux, sys_recvmsg);
+DECL_TEMPLATE (tilegx_linux, sys_shutdown);
+DECL_TEMPLATE (tilegx_linux, sys_bind);
+DECL_TEMPLATE (tilegx_linux, sys_listen);
+DECL_TEMPLATE (tilegx_linux, sys_getsockname);
+DECL_TEMPLATE (tilegx_linux, sys_getpeername);
+DECL_TEMPLATE (tilegx_linux, sys_socketpair);
+DECL_TEMPLATE (tilegx_linux, sys_semget);
+DECL_TEMPLATE (tilegx_linux, sys_semop);
+DECL_TEMPLATE (tilegx_linux, sys_semtimedop);
+DECL_TEMPLATE (tilegx_linux, sys_semctl);
+DECL_TEMPLATE (tilegx_linux, sys_msgget);
+DECL_TEMPLATE (tilegx_linux, sys_msgrcv);
+DECL_TEMPLATE (tilegx_linux, sys_msgsnd);
+DECL_TEMPLATE (tilegx_linux, sys_msgctl);
+DECL_TEMPLATE (tilegx_linux, sys_shmget);
+DECL_TEMPLATE (tilegx_linux, wrap_sys_shmat);
+DECL_TEMPLATE (tilegx_linux, sys_shmdt);
+DECL_TEMPLATE (tilegx_linux, sys_shmdt);
+DECL_TEMPLATE (tilegx_linux, sys_shmctl);
+DECL_TEMPLATE (tilegx_linux, sys_arch_prctl);
+DECL_TEMPLATE (tilegx_linux, sys_ptrace);
+DECL_TEMPLATE (tilegx_linux, sys_fadvise64);
+DECL_TEMPLATE (tilegx_linux, sys_mmap);
+DECL_TEMPLATE (tilegx_linux, sys_syscall184);
+DECL_TEMPLATE (tilegx_linux, sys_cacheflush);
+DECL_TEMPLATE (tilegx_linux, sys_set_dataplane);
 
 PRE(sys_clone)
 {
@@ -1106,6 +1107,15 @@ PRE(sys_mmap)
 /* ---------------------------------------------------------------
    PRE/POST wrappers for TILEGX/Linux-variant specific syscalls
    ------------------------------------------------------------ */
+PRE(sys_cacheflush)
+{
+   PRINT("cacheflush (%lx, %lx, %lx)", ARG1, ARG2, ARG3);
+   PRE_REG_READ3(long, "cacheflush", unsigned long, addr,
+                 int, nbytes, int, cache);
+   VG_ (discard_translations) ((Addr)ARG1, (ULong) ARG2,
+                               "PRE(sys_cacheflush)");
+   SET_STATUS_Success(0);
+}
 
 PRE(sys_set_dataplane)
 {
@@ -1368,6 +1378,7 @@ static SyscallTableEntry syscall_table[] = {
 
   PLAXY(__NR_accept4,           sys_accept4),              // 242
 
+  PLAX_(__NR_cacheflush,        sys_cacheflush),           // 245
   PLAX_(__NR_set_dataplane,     sys_set_dataplane),        // 246
 
   GENXY(__NR_wait4,             sys_wait4),                // 260
index 08137d8a2ef4b71def1c9f56e496ce81ee72a054..5d942157acccf2ec3895dfb7c0f6df038da5ea43 100644 (file)
  * starting with this value.
  */
 #define __NR_arch_specific_syscall 244
-#define __NR_set_dataplane 246 
+#define __NR_cacheflush 245
+#define __NR_set_dataplane 246
 #define __NR_wait4 260
 #define __NR_prlimit64 261
 #define __NR_fanotify_init 262