[lkml]   [2008]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: stack overflow on Sparc64
On Wed, 18 Jun 2008, David Miller wrote:

> From: Mikulas Patocka <>
> Date: Wed, 18 Jun 2008 23:24:20 -0400 (EDT)
>> BTW. what's the purpose of having 192-byte stack frame? There are 16
>> 8-byte registers being saved per function call, so 128-byte frame should
>> be sufficient, shoudn't? The ABI specifies that some additional entries
>> must be present even if unused, but I don't see reason for them. Would
>> something bad happen if GCC started to generate 128-byte stacks?
> The callee can pop the arguments into the area past the
> register window.

I see ... the callee writes arguments into caller's stack frame, if it has
variable number of arguments. That it misdesign, the callee should write
registers arguments into it's own frame like on AMD64 (then this space
would be allocated only if needed).
But nothing can be done with it since ABI was specified :-(


> So you have the 128 byte register window save area, 6
> slots for incoming arguments, which gives us 176 bytes.
> The rest is for some miscellaneous stack frame state,
> which I don't remember the details of at the moment.
> I'd have to read the sparc backend of gcc to remember.

 \ /
  Last update: 2008-06-19 07:21    [W:0.076 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site