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.
This commit is contained in:
cinap_lenrek 2014-09-20 01:07:46 +02:00
parent f899e55818
commit acd15f13c4

View file

@ -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);