This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: nightmares with biased stack pointers


|    Date: Mon, 15 Sep 1997 14:51:57 -0400 (EDT)
|    From: meissner@cygnus.com
| 
|    Another possibility is to use the elimination macros (ie, define a
|    new register which is the stack pointer without the bias, and then
|    eliminate to the real register via subtraction.
| 
| Interesting.
| 
| My one concern with this approach is that this modifies the range (via
| immediate offsets) which can be reached relative to the real stack,
| since it will be working with a virtual stack pointer.
| 
| Or do the elimination macros handle all of this transparently (or can
| be made to do so)?

Well yes, you do have to modify a whole passel of things.  Mostly notably as
Joern mentioned, the LEGITIMATE address macros, but also the register classes,
and any place that 'knows' about register mappings.  There may be other places,
since I don't know if anybody has eliminated the stack pointer before (you
might look for where HARD_FRAME_POINTER is supported).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]