A function that makes no other calls besides calls to __tls_get_addr does not allocate a stack frame with a parameter save area. According to the PowerPC64 ABI, any function that makes calls must allocate at least a 112 byte stack frame. This testcase, extracted from libstdc++
/* -m64 -fPIC -O2 */ int * get_global (void) { static __thread int global; return &global; } results in mflr 0 std 0,16(1) stdu 1,-48(1) addi 3,2,.lanch...@got@tlsld bl __tls_get_addr nop addi 1,1,48 addis 3,3,.lanch...@dtprel@ha addi 3,3,.lanch...@dtprel@l ld 0,16(1) mtlr 0 blr Note the 48 byte stack frame. -- Summary: stack frame lacks parameter save area Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: amodra at gmail dot com ReportedBy: amodra at gmail dot com GCC target triplet: powerpc64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44266