From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa751,2b7125d906267e85 X-Google-Attributes: gidfa751,public X-Google-Thread: 1051a8,609b85f3297346be X-Google-Attributes: gid1051a8,public X-Google-Thread: 1164f8,2b7125d906267e85 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-07-20 13:44:52 PST Xref: gmd.de comp.sys.mips:1187 comp.sys.dec:8896 comp.sys.sgi.hardware:1881 Path: gmd.de!xlink.net!howland.reston.ans.net!ux1.cso.uiuc.edu!vixen.cso.uiuc.edu!sdd.hp.com!think.com!paperboy.osf.org!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.sys.mips,comp.sys.dec,comp.sys.sgi.hardware Subject: Re: A few questions about `as' Date: 20 Jul 93 13:32:58 Organization: Open Software Foundation Message-ID: References: <1993Jul20.085332.3130@maths.tcd.ie> <22gm6r$9em@taloa.unice.fr> NNTP-Posting-Host: curley.osf.org In-reply-to: john@iastate.edu's message of Tue, 20 Jul 1993 14:31:43 GMT In article 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.