On Mon, Dec 15, 2008 at 2:20 PM, David Meggy <david.me...@icron.com> wrote:
> Hi, I'm working on a very embedded project where we have no operating
> system, and there is no window overflow trap handler.  I'm really
> stretched for memory and I'd like to reduce the stack size.  I haven't
> not being able to find anyone else who is looking at reducing the stack
> usage by google searching, but it seems like there is room to be saved,
> and I need the extra space.
>
> As I have no window overflow trap handler the space reserved on the
> stack for saving in and local registers is just wasted memory.  Is there
> any way I can reclaim this space by forcing the compiler to not honour
> the standard SPARC ABI?
>
> Would it be possible to take this one step further and drop the stack
> space for arguments?  We don't have functions with large numbers of
> arguments, so all arguments should be passed in registers.
>
> Although only a single word, the One-word hidden parameter, seems like a
> waste if none of our code ever uses it.
>
> David

With gcc 3.x, you can use -mflat which would do what you want.
gcc 4.x completely dropped the support for -mflat, so unless you (or
someone) work on reintroducing it,
IHMO, you're out of luck with gcc 4.x.

Seongbae

Reply via email to