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]
Other format: [Raw text]

Re: Build failure with 3.1 CVS on sparc-sun-solaris2.8


On Thu, 7 Feb 2002, Jakub Jelinek wrote:
> > To satisfy my curiosity, does anybody know why v9 has a stack bias?
> 
> Sparc load/store instruction addresses are either reg + reg or reg + 13 bit
> signed immediate. This is +-4KB. In most functions, the region accessed
> above frame pointer is quite small (function arguments) while below it is
> much larger. So, the stack bias makes these areas 2KB above and 6KB below.

I see.  Thanks for the enlightenment.

> Register windows aren't brain damaged as you think, it means that typical
> programs pass all arguments/return values in registers all the time without
> need for their saving.

Yes, that's the theory.  I suppose it depends on the code whether that
savings is offset by the overhead of overflow/underflow trap handlers.  In
particular, deep recursion must be bad on sparc.

And sparc stack frames are large and sloppy, creating a nuisance for
conservative garbage collectors e.g. the Boehm GC used by gcj.

Jeff


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