From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6616 invoked by alias); 25 May 2010 04:19:28 -0000 Received: (qmail 6580 invoked by uid 48); 25 May 2010 04:19:09 -0000 Date: Tue, 25 May 2010 04:19:00 -0000 Subject: [Bug target/44266] New: stack frame lacks parameter save area X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "amodra at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg02807.txt.bz2 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,.LANCHOR0@got@tlsld bl __tls_get_addr nop addi 1,1,48 addis 3,3,.LANCHOR0@dtprel@ha addi 3,3,.LANCHOR0@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