SPARC Assembly Language Reference Manual

Exit Print View

Updated: July 2014
 
 

6.4.2 Limitations for Both 32–Bit and 64–Bit Code

There is a minimum stack size for any routine, and certain areas of the stack that cannot be used.

The minimum stack frame size is just large enough to hold the register save area plus the required 6 slots for parameter passing. For 32-bit code, the minimum stack frame size is 92 bytes. This is normally allocated with a "save %sp, 92, %sp" instruction. For 64-bit code, the minimum stack frame size is 176 bytes. This is normally allocated with a "save %sp, 176, %sp" instruction.

The stack area below where %sp points is volatile and might be overwritten at any point in time (for example. by an interrupt). Do not store any useful data there, instead, change the %sp downward first and store above the %sp.