From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 1 Feb 2016 22:38:44 +0000 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=089e0122ea5a275fb1052abd0c2a Subject: Re: [9fans] FP register usage in Plan9 assembler Topicbox-Message-UUID: 80f1de04-ead9-11e9-9d60-3106f5b1d025 --089e0122ea5a275fb1052abd0c2a Content-Type: text/plain; charset=UTF-8 On 1 February 2016 at 16:47, Giacomo Tesio wrote: > MOVQ info+8(FP), BP > MOVL AX, 0(BP) > MOVL BX, 4(BP) > MOVL CX, 8(BP) > MOVL DX, 12(BP) > RET > > What I miss is where "info" comes from. > the syntax name+offset(FP) defines name as the given offset from the virtual frame pointer. The actual offset in machine code is set by the loader (8l, 6l, etc.), after taking account of the save area size, for example. The name is stored in a symbol table mainly for use by the debugger. --089e0122ea5a275fb1052abd0c2a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On 1 February 2016 at 16:47, Giacomo Tesio <giacomo@tesio.it>= wrote:
<= font face=3D"monospace,monospace">=C2=A0=C2=A0=C2=A0 MOVQ=C2=A0=C2=A0=C2=A0= info+8(FP), BP
=C2=A0=C2=A0=C2=A0 MOVL=C2=A0=C2=A0=C2=A0 AX, 0(BP)
= =C2=A0=C2=A0=C2=A0 MOVL=C2=A0=C2=A0=C2=A0 BX, 4(BP)
=C2=A0=C2=A0=C2=A0 M= OVL=C2=A0=C2=A0=C2=A0 CX, 8(BP)
=C2=A0=C2=A0=C2=A0 MOVL=C2=A0=C2=A0=C2= =A0 DX, 12(BP)
=C2=A0=C2=A0=C2=A0 RET

What I mi= ss is where "info" comes from.

the s= yntax name+offset(FP) defines name as the given offset from the virtual fra= me pointer.
The actual offset in machine co= de is set by the loader (8l, 6l, etc.), after taking account of the save ar= ea size, for example.
The name is stored in= a symbol table mainly for use by the debugger.
--089e0122ea5a275fb1052abd0c2a--