This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: nightmares with biased stack pointers
- To: davem at jenolan dot rutgers dot edu, meissner at cygnus dot com
- Subject: Re: nightmares with biased stack pointers
- From: meissner at cygnus dot com
- Date: Tue, 16 Sep 1997 10:56:20 -0400 (EDT)
- Cc: amylaar at cygnus dot co dot uk, egcs at cygnus dot com, law at cygnus dot com
| 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).