From acd15f13c4572aa2ac360f2c0deb6aa05351873d Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 20 Sep 2014 01:07:46 +0200 Subject: 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. --- sys/src/9/port/sysproc.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3