This is an archive of the discontinued LLVM Phabricator instance.

[mips] Implement 'la' macro in PIC mode for O32.
ClosedPublic

Authored by dsanders on May 31 2016, 8:35 AM.

Details

Summary

N32 support will follow in a later patch since the symbol version of 'la'
incorrectly believes N32 to have 64-bit pointers and rejects it early.

This fixes the three incorrectly expanded 'la' macros found in bionic.

Diff Detail

Repository
rL LLVM

Event Timeline

dsanders updated this revision to Diff 59077.May 31 2016, 8:35 AM
dsanders retitled this revision from to [mips] Implement 'la' macro in PIC mode for O32..
dsanders updated this object.
dsanders added a reviewer: sdardis.
dsanders added a subscriber: llvm-commits.
sdardis accepted this revision.Jun 1 2016, 8:26 AM
sdardis edited edge metadata.

The only difference I'm seeing is the la $25, 1f cases where the addend is already written due to the section relative relocation. ld handles that case fine.

This revision is now accepted and ready to land.Jun 1 2016, 8:26 AM

The only difference I'm seeing is the la $25, 1f cases where the addend is already written due to the section relative relocation. ld handles that case fine.

I think this difference may arise from comparing MIPS32R6 objects. MIPS32R6 restricted the changes that can be made to relocations but LLVM doesn't know about this yet.

Just for clarity, LGTM.

This revision was automatically updated to reflect the committed changes.