[llvm-bugs] [Bug 25839] New: __tls_get_addr gets called before saving return address

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 15 15:16:46 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25839

            Bug ID: 25839
           Summary: __tls_get_addr gets called before saving return
                    address
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: timshen91 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15457
  --> https://llvm.org/bugs/attachment.cgi?id=15457&action=edit
Minimized test case

For a PIC TLS variable access in a function, prologue (mflr followed by std and
stdu) gets scheduled after a __tls_get_addr call. __tls_get_addr messed up LR
and no one saves/restores it.

Should the fix be simply adding PPC::ADJCALLSTACKDOWN and PPC::ADJCALLSTACKUP
around __tls_get_addr? What should the stack size be (say, 0)?

Attached minimized test case that fails on trunk.

Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151215/decdc9b1/attachment.html>


More information about the llvm-bugs mailing list