ref: acd15f13c4572aa2ac360f2c0deb6aa05351873d
parent: f899e558186d46ad7223ce8be04e0d66a2c5f889
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);