ref: ee366055d3b9649f765860b72260b3bcc96f0dae
parent: 4c151697bfc5eead073f8b89b319320d68498178
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Sep 19 21:07:46 EDT 2014
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.
--- a/sys/src/9/port/sysproc.c
+++ b/sys/src/9/port/sysproc.c
@@ -1190,6 +1190,12 @@
{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);
--
⑨