public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/44266]  New: stack frame lacks parameter save area
@ 2010-05-25  4:19 amodra at gmail dot com
  2010-05-25  4:19 ` [Bug target/44266] " amodra at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: amodra at gmail dot com @ 2010-05-25  4:19 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <bug-44266-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2010-11-17  6:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-25  4:19 [Bug target/44266] New: stack frame lacks parameter save area amodra at gmail dot com
2010-05-25  4:19 ` [Bug target/44266] " amodra at gmail dot com
2010-05-25 13:42 ` amodra at gmail dot com
2010-05-25 13:45 ` amodra at gmail dot com
2010-05-26  2:49 ` amodra at gmail dot com
2010-05-28  8:57 ` amodra at gcc dot gnu dot org
2010-05-29 14:17 ` bergner at gcc dot gnu dot org
2010-06-04  3:03 ` amodra at gmail dot com
     [not found] <bug-44266-4@http.gcc.gnu.org/bugzilla/>
2010-11-17  6:10 ` amodra at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).