This is an archive of the discontinued LLVM Phabricator instance.

Add call sequence start and end for __tls_get_addr
ClosedPublic

Authored by timshen on Dec 17 2015, 10:46 AM.

Details

Reviewers
kbarton
hfinkel
Summary

This is a fix for bug http://llvm.org/bugs/show_bug.cgi?id=25839.

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 but no one saves/restores it.

Also added a test for save/restore clobbered registers during calling __tls_get_addr.

Diff Detail

Event Timeline

timshen updated this revision to Diff 43094.Dec 17 2015, 10:46 AM
timshen retitled this revision from to Add call sequence start and end for __tls_get_addr.
timshen updated this object.
timshen added a subscriber: llvm-commits.
timshen added a subscriber: echristo.
kbarton edited edge metadata.Jan 7 2016, 3:41 PM

It's a minor nit, but I think it's good to include a general description of the problem in the summary (or at least a link to the bugzilla report).

kbarton accepted this revision.Jan 7 2016, 3:41 PM
kbarton edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Jan 7 2016, 3:41 PM
timshen updated this object.Jan 7 2016, 3:44 PM
timshen edited edge metadata.
timshen closed this revision.Jan 8 2016, 11:31 AM

Thanks iteratee for committing as r257137 !