Implement decoding of splice, tee and vmsplice(2) syscalls

* io.c (print_loff_t): New function.
(sys_sendfile64): Use it.
(splice_flags): New xlat structure.
(sys_tee, sys_splice, sys_vmsplice): New functions.
* linux/syscall.h (sys_tee, sys_splice, sys_vmsplice): Declare them.
* linux/*/syscallent.h: Use them.
diff --git a/io.c b/io.c
index 758592d..acc5bb5 100644
--- a/io.c
+++ b/io.c
@@ -361,27 +361,106 @@
 	return 0;
 }
 
+static void
+print_loff_t(struct tcb *tcp, long addr)
+{
+	loff_t offset;
+
+	if (!addr)
+		tprints("NULL");
+	else if (umove(tcp, addr, &offset) < 0)
+		tprintf("%#lx", addr);
+	else
+		tprintf("[%llu]", (unsigned long long int) offset);
+}
+
 int
 sys_sendfile64(struct tcb *tcp)
 {
 	if (entering(tcp)) {
-		loff_t offset;
-
 		printfd(tcp, tcp->u_arg[0]);
 		tprints(", ");
 		printfd(tcp, tcp->u_arg[1]);
 		tprints(", ");
-		if (!tcp->u_arg[2])
-			tprints("NULL");
-		else if (umove(tcp, tcp->u_arg[2], &offset) < 0)
-			tprintf("%#lx", tcp->u_arg[2]);
-		else
-			tprintf("[%llu]", (unsigned long long int) offset);
+		print_loff_t(tcp, tcp->u_arg[2]);
 		tprintf(", %lu", tcp->u_arg[3]);
 	}
 	return 0;
 }
 
+static const struct xlat splice_flags[] = {
+#ifdef SPLICE_F_MOVE
+	{ SPLICE_F_MOVE,     "SPLICE_F_MOVE"     },
+#endif
+#ifdef SPLICE_F_NONBLOCK
+	{ SPLICE_F_NONBLOCK, "SPLICE_F_NONBLOCK" },
+#endif
+#ifdef SPLICE_F_MORE
+	{ SPLICE_F_MORE,     "SPLICE_F_MORE"     },
+#endif
+#ifdef SPLICE_F_GIFT
+	{ SPLICE_F_GIFT,     "SPLICE_F_GIFT"     },
+#endif
+	{ 0,                 NULL                },
+};
+
+int
+sys_tee(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		/* int fd_in */
+		printfd(tcp, tcp->u_arg[0]);
+		tprints(", ");
+		/* int fd_out */
+		printfd(tcp, tcp->u_arg[1]);
+		tprints(", ");
+		/* size_t len */
+		tprintf("%lu, ", tcp->u_arg[2]);
+		/* unsigned int flags */
+		printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???");
+	}
+	return 0;
+}
+
+int
+sys_splice(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		/* int fd_in */
+		printfd(tcp, tcp->u_arg[0]);
+		tprints(", ");
+		/* loff_t *off_in */
+		print_loff_t(tcp, tcp->u_arg[1]);
+		tprints(", ");
+		/* int fd_out */
+		printfd(tcp, tcp->u_arg[2]);
+		tprints(", ");
+		/* loff_t *off_out */
+		print_loff_t(tcp, tcp->u_arg[3]);
+		tprints(", ");
+		/* size_t len */
+		tprintf("%lu, ", tcp->u_arg[4]);
+		/* unsigned int flags */
+		printflags(splice_flags, tcp->u_arg[5], "SPLICE_F_???");
+	}
+	return 0;
+}
+
+int
+sys_vmsplice(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		/* int fd */
+		printfd(tcp, tcp->u_arg[0]);
+		tprints(", ");
+		/* const struct iovec *iov, unsigned long nr_segs */
+		tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
+		tprints(", ");
+		/* unsigned int flags */
+		printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???");
+	}
+	return 0;
+}
 #endif /* LINUX */
 
 #if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
diff --git a/linux/alpha/syscallent.h b/linux/alpha/syscallent.h
index 7fe45a3..f4e3191 100644
--- a/linux/alpha/syscallent.h
+++ b/linux/alpha/syscallent.h
@@ -496,10 +496,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"		}, /* 465 */
 	{ 2,	0,	printargs,		"set_robust_list"	}, /* 466 */
 	{ 3,	0,	printargs,		"get_robust_list"	}, /* 467 */
-	{ 6,	TD,	printargs,		"splice"		}, /* 468 */
+	{ 6,	TD,	sys_splice,		"splice"		}, /* 468 */
 	{ 4,	TD,	printargs,		"sync_file_range"	}, /* 469 */
-	{ 4,	TD,	printargs,		"tee"			}, /* 470 */
-	{ 4,	TD,	printargs,		"vmsplice"		}, /* 471 */
+	{ 4,	TD,	sys_tee,		"tee"			}, /* 470 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"		}, /* 471 */
 	{ 6,	0,	sys_move_pages,		"move_pages"		}, /* 472 */
 	{ 3,	0,	sys_getcpu,		"getcpu"		}, /* 473 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"		}, /* 474 */
diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h
index 48cd3dd..0b38ae4 100644
--- a/linux/arm/syscallent.h
+++ b/linux/arm/syscallent.h
@@ -370,10 +370,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 337 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 338 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 339 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 340 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 340 */
 	{ 5,	0,	printargs,		"SYS_341"	}, /* 341 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 342 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 343 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 342 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 343 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 344 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 345 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 346 */
diff --git a/linux/avr32/syscallent.h b/linux/avr32/syscallent.h
index 11742c1..d8801a6 100644
--- a/linux/avr32/syscallent.h
+++ b/linux/avr32/syscallent.h
@@ -288,10 +288,10 @@
 	{ 1,	TD,	sys_unshare,		"unshare"	}, /* 258 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 259 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 260 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 261 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 261 */
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 262 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 263 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 264 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 263 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 264 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 265 */
 	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 266 */
 	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 267 */
diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h
index 86f0101..a30ba2c 100644
--- a/linux/bfin/syscallent.h
+++ b/linux/bfin/syscallent.h
@@ -370,10 +370,10 @@
 	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 339 */
 	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 340 */
 	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 341 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 342 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 342 */
 	{ 4,	TD,	printargs,		"sync_file_range"	}, /* 343 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 344 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 345 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 344 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 345 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 346 */
 	{ 4,	TD|TF,	sys_utimensat,		"utimensat"	}, /* 347 */
 	{ 3,	TD|TS,	sys_signalfd,		"signalfd"	}, /* 348 */
diff --git a/linux/hppa/syscallent.h b/linux/hppa/syscallent.h
index 24cfb23..9ef3682 100644
--- a/linux/hppa/syscallent.h
+++ b/linux/hppa/syscallent.h
@@ -296,10 +296,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"		}, /* 288 */
 	{ 2,	0,	printargs,		"set_robust_list"	}, /* 289 */
 	{ 3,	0,	printargs,		"get_robust_list"	}, /* 290 */
-	{ 6,	TD,	printargs,		"splice"		}, /* 291 */
+	{ 6,	TD,	sys_splice,		"splice"		}, /* 291 */
 	{ 4,	TD,	printargs,		"sync_file_range"	}, /* 292 */
-	{ 4,	TD,	printargs,		"tee"			}, /* 293 */
-	{ 4,	TD,	printargs,		"vmsplice"		}, /* 294 */
+	{ 4,	TD,	sys_tee,		"tee"			}, /* 293 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"		}, /* 294 */
 	{ 6,	0,	sys_move_pages,		"move_pages"		}, /* 295 */
 	{ 3,	0,	sys_getcpu,		"getcpu"		}, /* 296 */
 	{ 6,	TD,	sys_epoll_pwait,	"epoll_pwait"		}, /* 297 */
diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h
index 1781223..73e1d96 100644
--- a/linux/i386/syscallent.h
+++ b/linux/i386/syscallent.h
@@ -343,10 +343,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 310 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 311 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 312 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 313 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 313 */
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 314 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 315 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 316 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 315 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 316 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 317 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 318 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 319 */
diff --git a/linux/ia64/syscallent.h b/linux/ia64/syscallent.h
index 4701e5a..340bc36 100644
--- a/linux/ia64/syscallent.h
+++ b/linux/ia64/syscallent.h
@@ -1103,10 +1103,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 1296 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 1297 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 1298 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 1299 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 1299 */
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 1300 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 1301 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 1302 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 1301 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 1302 */
 	{ MA,	0,	printargs,		"SYS_1303"	}, /* 1303 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 1304 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 1305 */
diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h
index d2cda53..e2a37d4 100644
--- a/linux/m68k/syscallent.h
+++ b/linux/m68k/syscallent.h
@@ -334,10 +334,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 303 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 304 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 305 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 306 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 306 */
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 307 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 308 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 309 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 308 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 309 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 310 */
 	{ 3,	0,	sys_sched_setaffinity,	"sched_setaffinity" },/* 311 */
 	{ 3,	0,	sys_sched_getaffinity,	"sched_getaffinity" },/* 312 */
diff --git a/linux/microblaze/syscallent.h b/linux/microblaze/syscallent.h
index fb1fc7e..f16a01a 100644
--- a/linux/microblaze/syscallent.h
+++ b/linux/microblaze/syscallent.h
@@ -342,10 +342,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 310 */
 	{ 2,	0,	printargs,		"set_robust_list"	}, /* 311 */
 	{ 3,	0,	printargs,		"get_robust_list"	}, /* 312 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 313 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 313 */
 	{ 4,	TD,	printargs,		"sync_file_range"}, /* 314 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 315 */
-	{ 5,	TD,	printargs,		"vmsplice"	}, /* 316 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 315 */
+	{ 5,	TD,	sys_vmsplice,		"vmsplice"	}, /* 316 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 317 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 318 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 319 */
diff --git a/linux/mips/syscallent.h b/linux/mips/syscallent.h
index a6c4c13..4f400a3 100644
--- a/linux/mips/syscallent.h
+++ b/linux/mips/syscallent.h
@@ -4306,10 +4306,10 @@
 	{ 6,	TD,	sys_pselect6,		"pselect6"	}, /* 4301 */
 	{ 5,	TD,	sys_ppoll,		"ppoll"		}, /* 4302 */
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 4303 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 4304 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 4304 */
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 4305 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 4306 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 4307 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 4306 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 4307 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 4308 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 4309 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 4310 */
@@ -5608,10 +5608,10 @@
 	{ 6,	TD,	sys_pselect6,		"pselect6"	}, /* 5260 */
 	{ 5,	TD,	sys_ppoll,		"ppoll"		}, /* 5261 */
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 5262 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 5263 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 5263 */
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 5264 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 5265 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 5266 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 5265 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 5266 */
 	{ 6,	0,	printargs,		"move_pages"	}, /* 5267 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 5268 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 5269 */
@@ -6918,10 +6918,10 @@
 	{ 6,	TD,	sys_pselect6,		"pselect6"	}, /* 6264 */
 	{ 5,	TD,	sys_ppoll,		"ppoll"		}, /* 6265 */
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 6266 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 6267 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 6267 */
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 6268 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 6269 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 6270 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 6269 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 6270 */
 	{ 6,	0,	printargs,		"move_pages"	}, /* 6271 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 6272 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 6273 */
diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h
index 6be7277..1997a0e 100644
--- a/linux/powerpc/syscallent.h
+++ b/linux/powerpc/syscallent.h
@@ -311,9 +311,9 @@
 	{ 6,	TD,	sys_pselect6,		"pselect6"		}, /* 280 */
 	{ 5,	TD,	sys_ppoll,		"ppoll"			}, /* 281 */
 	{ 1,	TP,	sys_unshare,		"unshare"		}, /* 282 */
-	{ 6,	TD,	printargs,		"splice"		}, /* 283 */
-	{ 4,	TD,	printargs,		"tee"			}, /* 284 */
-	{ 4,	TD,	printargs,		"vmsplice"		}, /* 285 */
+	{ 6,	TD,	sys_splice,		"splice"		}, /* 283 */
+	{ 4,	TD,	sys_tee,		"tee"			}, /* 284 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"		}, /* 285 */
 	{ 4,	TD|TF,	sys_openat,		"openat"		}, /* 286 */
 	{ 3,	TD|TF,	sys_mkdirat,		"mkdirat"		}, /* 287 */
 	{ 4,	TD|TF,	sys_mknodat,		"mknodat"		}, /* 288 */
diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h
index 91787fa..6924697 100644
--- a/linux/s390/syscallent.h
+++ b/linux/s390/syscallent.h
@@ -334,10 +334,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 303 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 304 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 305 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 306 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 306 */
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 307 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 308 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 309 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 308 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 309 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 310 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 311 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 312 */
diff --git a/linux/s390x/syscallent.h b/linux/s390x/syscallent.h
index 606d196..e59e307 100644
--- a/linux/s390x/syscallent.h
+++ b/linux/s390x/syscallent.h
@@ -333,10 +333,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 303 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 304 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 305 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 306 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 306 */
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 307 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 308 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 309 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 308 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 309 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 310 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 311 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 312 */
diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h
index d71a493..3a4e622 100644
--- a/linux/sh/syscallent.h
+++ b/linux/sh/syscallent.h
@@ -345,10 +345,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 310 */
 	{ 2,	0,	printargs,		"set_robust_list"}, /* 311 */
 	{ 3,	0,	printargs,		"get_robust_list"}, /* 312 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 313 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 313 */
 	{ 4,	TD,	printargs,		"sync_file_range"}, /* 314 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 315 */
-	{ 5,	TD,	printargs,		"vmsplice"	}, /* 316 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 315 */
+	{ 5,	TD,	sys_vmsplice,		"vmsplice"	}, /* 316 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 317 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 318 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 319 */
diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h
index 2c3f6da..50270f5 100644
--- a/linux/sh64/syscallent.h
+++ b/linux/sh64/syscallent.h
@@ -369,10 +369,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 338 */
 	{ 2,	0,	printargs,		"set_robust_list"}, /* 339 */
 	{ 3,	0,	printargs,		"get_robust_list"}, /* 340 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 341 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 341 */
 	{ 4,	TD,	printargs,		"sync_file_range"}, /* 342 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 343 */
-	{ 5,	TD,	printargs,		"vmsplice"	}, /* 344 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 343 */
+	{ 5,	TD,	sys_vmsplice,		"vmsplice"	}, /* 344 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 345 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 346 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 347 */
diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h
index 23269e0..a6fa1ed 100644
--- a/linux/sparc/syscallent.h
+++ b/linux/sparc/syscallent.h
@@ -278,7 +278,7 @@
 	{ 2,	0,	sys_mq_notify,		"mq_notify"	}, /* 277 */
 	{ 3,	0,	sys_mq_getsetattr,	"mq_getsetattr"	}, /* 278 */
 	{ 5,	TP,	sys_waitid,		"waitid"	}, /* 279 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 280 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 280 */
 	{ 5,	0,	printargs,		"add_key"	}, /* 281 */
 	{ 4,	0,	printargs,		"request_key"	}, /* 282 */
 	{ 5,	0,	printargs,		"keyctl"	}, /* 283 */
diff --git a/linux/syscall.h b/linux/syscall.h
index b3a778d..b7ad67c 100644
--- a/linux/syscall.h
+++ b/linux/syscall.h
@@ -141,6 +141,9 @@
 int sys_pselect6();
 int sys_ppoll();
 int sys_unshare();
+int sys_tee();
+int sys_splice();
+int sys_vmsplice();
 
 /* architecture-specific calls */
 #ifdef ALPHA
diff --git a/linux/tile/syscallent.h b/linux/tile/syscallent.h
index 42814bc..4f406a0 100644
--- a/linux/tile/syscallent.h
+++ b/linux/tile/syscallent.h
@@ -283,10 +283,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare" }, /* 282 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 283 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 284 */
-	{ 6,	TD,	printargs,		"splice" }, /* 285 */
+	{ 6,	TD,	sys_splice,		"splice" }, /* 285 */
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 286 */
-	{ 4,	TD,	printargs,		"tee" }, /* 287 */
-	{ 4,	TD,	printargs,		"vmsplice" }, /* 288 */
+	{ 4,	TD,	sys_tee,		"tee" }, /* 287 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice" }, /* 288 */
 	{ 6,	TP,	sys_move_pages,		"move_pages" }, /* 289 */
 	{ 1,	TP,	printargs,		"unused" }, /* 290 */
 	{ 1,	0,	printargs,		"cmpxchg_badaddr" }, /* 291 */
diff --git a/linux/x86_64/syscallent.h b/linux/x86_64/syscallent.h
index 73e4acf..0aa6759 100644
--- a/linux/x86_64/syscallent.h
+++ b/linux/x86_64/syscallent.h
@@ -273,10 +273,10 @@
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 272 */
 	{ 2,	0,	printargs,		"set_robust_list" }, /* 273 */
 	{ 3,	0,	printargs,		"get_robust_list" }, /* 274 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 275 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 276 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 275 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 276 */
 	{ 4,	TD,	printargs,		"sync_file_range" }, /* 277 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 278 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 278 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 279 */
 	{ 4,	TD|TF,	sys_utimensat,		"utimensat"	}, /* 280 */
 	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 281 */