nightmares with biased stack pointers
David S. Miller
davem@jenolan.rutgers.edu
Mon Sep 15 06:26:00 GMT 1997
Date: Mon, 15 Sep 1997 01:01:41 -0600
From: Jeffrey A Law <law@hurl.cygnus.com>
In message < 199709140245.WAA13369@jenolan.rutgers.edu >you write:
> I'm not sure that I follow.
Set STACK_BOUNDARY to 8 bits, which effectively describes what you know
about the alignment of "sp" -- ie nothing.
This is likely to have some undesirable effects; namely parameters might
not be put in the right spots in memory and frames created in prologues
might not keep the stack aligned properly, so you'd have to go back
and play with the macros & code which control this stuff.
Interesting idea then.
However, previously I had no idea how localized the real problem
actually was. Jakub's proposed fixes show that things are very
localized and can be fixed with small amounts of changes to the
backend. I think I'm going to work on his suggested changes.
Another way might be to emit some suitably complex and ugly rtl when
allocating dynamic space so that the combiner doesn't optimize important
stuff away. Kinda gross, but another approach if STACK_BOUNDARY doesn't work.
Right, I originally thought of something along these lines, marking
the addition of STACK_BIAS to %sp as "volatile" to tell gcc "you have
no idea why this is done". But in the end I considered that too hokey
to be a "solution".
Later,
David "Sparc" Miller
davem@caip.rutgers.edu
More information about the Gcc
mailing list