From: meissner@osf.org (Michael Meissner)
Subject: Re: A few questions about `as'
Date: 20 Jul 93 13:32:58 [thread overview]
Message-ID: <MEISSNER.93Jul20133258@curley.osf.org> (raw)
In-Reply-To: john@iastate.edu's message of Tue, 20 Jul 1993 14:31:43 GMT
In article <CAGwCw.KwC@news.iastate.edu> john@iastate.edu (John Hascall) writes:
| In article <22gm6r$9em@taloa.unice.fr> desnogue@mimosa.unice.fr writes:
| }I am using `as' version 2.1 under Ultrix to assemble code
| }output by a code generator I'm writing.
|
| } - In Kane & Heinrich 's book pp D-19ff., the $fp register
| } is mentionned (under the name virtual frame pointer);
| } does this register really exist (for the compiler kit I
| } mean) or is it really `virtual' ?
| } Anyway which register should I use for $fp ? I'm currently
| } using $30 (s8).
|
| According to D-20 and D-21 the general use is:
|
| subu $sp,framesize
| .frame $sp,framesize,$31
|
| That is to say, there is no real reason to save the previous
| version of $sp in some register as ``$fp'' -- you can get at
| whatever you want with offsets from $sp. So it really is
| virtual (I'm not sure why they even mentioned it, actually).
This only works if your function does not variable size allocation of stack
space. If it does do variable size allocation, then you need to use a separate
frame pointer. After all, not everything in the world is C.
--
Michael Meissner email: meissner@osf.org phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142
Old hackers never die, they just get buggier.
prev parent reply other threads:[~1993-07-20 17:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1993Jul20.085332.3130@maths.tcd.ie>
1993-07-20 11:50 ` A few questions about `as' Desnogues
1993-07-20 14:31 ` John Hascall
1993-07-20 17:32 ` Michael Meissner [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox