This is an archive of the discontinued LLVM Phabricator instance.

[MIPS] Fix local dynamic TLS with Sym64
ClosedPublic

Authored by jrtc27 on Jul 12 2018, 11:16 AM.

Details

Summary

For the final DTPREL addition, rather than a lui/daddiu/daddu triple,
LLVM was erronously emitting a daddiu/daddiu pair, treating the
%dtprel_hi as if it were a %dtprel_lo, since Mips::Hi expands unshifted
for Sym64. Instead, use a new TlsHi node and, although unnecessary
due to the exact structure of the nodes emitted, use TlsHi for local
exec too to prevent future bugs. Also garbage-collect the unused
TprelLo and TlsGd nodes, and TprelHi since its functionality is provided
by the new common TlsHi node.

Diff Detail

Repository
rL LLVM

Event Timeline

jrtc27 created this revision.Jul 12 2018, 11:16 AM
jrtc27 updated this revision to Diff 155417.Jul 13 2018, 10:00 AM

I've merged DtprelHi and TprelHi into a single node rather providing two copies
of their functionality.

jrtc27 edited the summary of this revision. (Show Details)Jul 13 2018, 10:18 AM

Could you please rebase the patch against the trunk?

jrtc27 updated this revision to Diff 156815.Jul 23 2018, 10:16 AM
jrtc27 edited the summary of this revision. (Show Details)

Rebased against trunk

atanasyan accepted this revision.Jul 24 2018, 6:46 AM

LGTM. Thanks for the patch.

This revision is now accepted and ready to land.Jul 24 2018, 6:46 AM
This revision was automatically updated to reflect the committed changes.