Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* A few questions about `as'
       [not found] <1993Jul20.085332.3130@maths.tcd.ie>
@ 1993-07-20 11:50 ` Desnogues
  1993-07-20 14:31   ` John Hascall
  0 siblings, 1 reply; 3+ messages in thread
From: Desnogues @ 1993-07-20 11:50 UTC (permalink / raw)


I am using `as' version 2.1 under Ultrix to assemble code
output by a code generator I'm writing.

My questions are :
   - 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).
   - There are macros for div, divu and mul. Why isn't there
     any for mulu (it should be the same as mul, just replacing
     mult by multu) ?

Best regards,


		Laurent Desnogues


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A few questions about `as'
  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
  0 siblings, 1 reply; 3+ messages in thread
From: John Hascall @ 1993-07-20 14:31 UTC (permalink / raw)


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).

John
-- 
John Hascall                   ``An ill-chosen word is the fool's messenger.''
Systems Software Engineer
Project Vincent
Iowa State University Computation Center  +  Ames, IA  50011  +  515/294-9551


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A few questions about `as'
  1993-07-20 14:31   ` John Hascall
@ 1993-07-20 17:32     ` Michael Meissner
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Meissner @ 1993-07-20 17:32 UTC (permalink / raw)


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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1993-07-20 17:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox