From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 1 Feb 2016 22:44:45 +0000 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=001a1146ed2ca3edc4052abd21a9 Subject: Re: [9fans] FP register usage in Plan9 assembler Topicbox-Message-UUID: 80fa1b1e-ead9-11e9-9d60-3106f5b1d025 --001a1146ed2ca3edc4052abd21a9 Content-Type: text/plain; charset=UTF-8 On 1 February 2016 at 22:38, Charles Forsyth wrote: > the syntax name+offset(FP) defines name as the given offset from the > virtual frame pointer. I ought to have added that it's +8 because info is the second parameter, where the parameter space is divided into slots of 8 bytes on amd64 and 4 bytes on the 32-bit architectures. on amd64, the first parameter is passed in a register (BP); as on some of the RISC machines. on amd64, the second parameter is +8(FP), third is +16(FP), and so on. on x86/32 the first parameter is passed on the stack, so it's +0(FP), +4(FP), ... --001a1146ed2ca3edc4052abd21a9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On 1 February 2016 at 22:38, Charles Forsyth <charles.forsyth@gma= il.com> wrote:
the syntax n= ame+offset(FP) defines name as the given offset from the virtual frame poin= ter.

I ought to have added that it's +8 because i= nfo is the second parameter, where the parameter space is
divided into slots of 8 bytes on amd64 and 4 bytes on the = 32-bit architectures. on amd64, the first parameter is passed in a register= (BP);
as on some of the RISC machines. on = amd64, the second parameter is +8(FP), third is +16(FP), and so on.
=C2=A0on x86/32 the first parameter is passed on t= he stack, so it's +0(FP), +4(FP), ...
<= br>
--001a1146ed2ca3edc4052abd21a9--