From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 20 Oct 2008 17:03:28 -0400 From: Nathaniel W Filardo To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20081020210328.GM4216@masters10.cs.jhu.edu> References: <20081020072645.GJ4216@masters10.cs.jhu.edu> <244fbb7370d6d3e7069c3e06c1116877@terzarima.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+hZIELbchok2+JHy" Content-Disposition: inline In-Reply-To: <244fbb7370d6d3e7069c3e06c1116877@terzarima.net> User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: [9fans] What's so special about seek() ? Topicbox-Message-UUID: 22cd5fba-ead4-11e9-9d60-3106f5b1d025 --+hZIELbchok2+JHy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 20, 2008 at 10:11:22PM +0100, Charles Forsyth wrote: > >Forgive my ignorance, but I don't see how the code in question relates to > >returning a 64-bit value? > MOVL a+0(FP),CX > MOVL AX,0(CX) > MOVL AX,4(CX) >=20 > that's how a 64-bit value is returned on 32-bit machines: > similar to returning a structure, the caller passes a > hidden first argument referring to the 64-bit return location. > in this case, since -1 is already in AX, storing that in both 32-bit > parts of the 64-bit value produces -1LL Oh interesting. Thanks for the clarification. I had thought 64 bit returns were done in %eax and %edx. Sorry for the noise. --nwf; --+hZIELbchok2+JHy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkj88iAACgkQTeQabvr9Tc90DACbBp1JR1PetksLRpM60avm+o0I OygAn1HMsWDSz3d/MXmVR0wHQDGH1aVH =TO/M -----END PGP SIGNATURE----- --+hZIELbchok2+JHy--