summaryrefslogtreecommitdiff
path: root/compiler-rt/utils
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2018-10-30 11:03:37 +0000
committerKamil Rytarowski <n54@gmx.com>2018-10-30 11:03:37 +0000
commit1308779f7915319b3f9bf4a68a5dfa0966ce8740 (patch)
tree552ab4d150577b87f240db279791badabf4ef88f /compiler-rt/utils
parent1e74ecab174d4e4d5b7c2403b00778f3baa2262e (diff)
downloadllvm-1308779f7915319b3f9bf4a68a5dfa0966ce8740.tar.gz
Update generate_netbsd_syscalls.awk for NetBSD 8.99.25
Register new syscall getsockopt2. Drop removed syscalls pmc_get_info and pmc_control. While there address compiler warnings about potentially unused variables. llvm-svn: 345580
Diffstat (limited to 'compiler-rt/utils')
-rwxr-xr-xcompiler-rt/utils/generate_netbsd_syscalls.awk12
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler-rt/utils/generate_netbsd_syscalls.awk b/compiler-rt/utils/generate_netbsd_syscalls.awk
index 5e08900a17ee..ac08025460fb 100755
--- a/compiler-rt/utils/generate_netbsd_syscalls.awk
+++ b/compiler-rt/utils/generate_netbsd_syscalls.awk
@@ -1464,6 +1464,8 @@ function syscall_body(syscall, mode)
pcmd(" }")
pcmd("}")
}
+ } else if (syscall == "getsockopt2") {
+ pcmd("/* TODO */")
} else if (syscall == "fpathconf") {
pcmd("/* Nothing to do */")
} else if (syscall == "getrlimit") {
@@ -1982,10 +1984,6 @@ function syscall_body(syscall, mode)
pcmd("if (nsa_) {")
pcmd(" PRE_READ(nsa_, sizeof(__sanitizer_sigaction));")
pcmd("}")
- } else if (syscall == "pmc_get_info") {
- pcmd("/* TODO */")
- } else if (syscall == "pmc_control") {
- pcmd("/* TODO */")
} else if (syscall == "rasctl") {
pcmd("/* Nothing to do */")
} else if (syscall == "kqueue") {
@@ -2935,16 +2933,14 @@ function syscall_body(syscall, mode)
} else if (syscall == "sendmmsg") {
if (mode == "pre") {
pcmd("struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;")
- pcmd("unsigned int vlen = (vlen_ > 1024 ? 1024 : vlen_);")
pcmd("if (mmsg) {")
- pcmd(" PRE_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) * vlen);")
+ pcmd(" PRE_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) * (vlen_ > 1024 ? 1024 : vlen_));")
pcmd("}")
} else {
pcmd("struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;")
- pcmd("unsigned int vlen = (vlen_ > 1024 ? 1024 : vlen_);")
pcmd("if (res >= 0) {")
pcmd(" if (mmsg) {")
- pcmd(" POST_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) * vlen);")
+ pcmd(" POST_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) * (vlen_ > 1024 ? 1024 : vlen_));")
pcmd(" }")
pcmd("}")
}