Subject: Re: amd64 syscall.c question
To: None <port-amd64@netbsd.org>
From: Andrew Doran <ad@netbsd.org>
List: port-amd64
Date: 06/06/2007 18:31:42
On Wed, Jun 06, 2007 at 05:03:23PM +0000, Christos Zoulas wrote:

> My understanding is that in 4.3 there used to be syscalls that
> returned 2 values (grep _with_ /usr/src/sys/kern/syscalls.master),
> and the second value used %edx on i386 (the first uses %eax). This
> dual return is also used in COMPAT_LINUX.  Since amd64 did not
> exist circa 4.3BSD, these syscalls were never used, and there are
> no other syscalls that require 2 value return currently, so there
> is no need to do anything to %rdx since nobody uses it (the first
> value is returned on %rax).

There are also a few syscalls like lseek() that return 64-bit values.
On i386 the high 32 bits goes into %edx.

Andrew