nightmares with biased stack pointers
Tue Sep 16 07:58:00 GMT 1997

|    Date: Mon, 15 Sep 1997 14:51:57 -0400 (EDT)
|    From:
|    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).

More information about the Gcc mailing list