From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Thu, 12 Jun 2014 09:41:53 -0400 To: 9fans@9fans.net Message-ID: <623b64d7e9aa7b9a8a91c0d3cda2819a@brasstown.quanstro.net> In-Reply-To: <2b4c21e3aa0b13cd88427a6cbd0d8537@felloff.net> References: <2b4c21e3aa0b13cd88427a6cbd0d8537@felloff.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] 9syscall Topicbox-Message-UUID: faa4869e-ead8-11e9-9d60-3106f5b1d025 On Thu Jun 12 09:35:29 EDT 2014, cinap_lenrek@felloff.net wrote: > because the kernel assumes that returned vlong is passed > by reference in the first argument, where on amd64, the > (amd64) calling convention returns it in 64 bit AX register. > > so seek() is a library func that emulates the previous convention > for _seek() syscall. that's not how the amd64 kernel has worked. the registers are 64 bits, the return value, regardless of where it is is 64 bits. for example, anything returning an address would already just work, such as segbrk. - erik