summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-09-20 01:07:46 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-09-20 01:07:46 +0200
commitacd15f13c4572aa2ac360f2c0deb6aa05351873d (patch)
treeb3e0920b74ea138689d30447eb5026c214cd905d
parentf899e558186d46ad7223ce8be04e0d66a2c5f889 (diff)
downloadplan9front-acd15f13c4572aa2ac360f2c0deb6aa05351873d.tar.xz
pc64: put return value of nsec syscall in register on amd64
WHAT WHERE THEY *THINKING*??!?! unlike seek, the (new) nsec syscall (not used in 9front libc) returns the time value in register (from nix), so do the same for compatibility.
-rw-r--r--sys/src/9/port/sysproc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/src/9/port/sysproc.c b/sys/src/9/port/sysproc.c
index f1178d558..3cee4f15a 100644
--- a/sys/src/9/port/sysproc.c
+++ b/sys/src/9/port/sysproc.c
@@ -1190,6 +1190,12 @@ sys_nsec(va_list list)
{
vlong *v;
+ /* return in register on 64bit machine */
+ if(sizeof(uintptr) == sizeof(vlong)){
+ USED(list);
+ return (uintptr)todget(nil);
+ }
+
v = va_arg(list, vlong*);
evenaddr((uintptr)v);
validaddr((uintptr)v, sizeof(vlong), 1);