This is an archive of the discontinued LLVM Phabricator instance.

[mips][ias] Expand on r238751 to cover as many relocs as possible.
ClosedPublic

Authored by dsanders on Jun 2 2015, 6:39 AM.

Details

Summary

Relocs that can be converted from absolute to PC-relative now do so if IsPCRel
is true. Relocs that require PC-relative now call llvm_unreachable() if IsPCRel
is false and similarly those that require absolute assert that IsPCRel is false.

Note that while it looks like some relocs (e.g. R_MIPS_26) can be converted into
the MIPS32r6/MIPS64r6 relocs (R_MIPS_PC*_S2), it isn't actually valid to do so.

Placeholders have been left in the testcase for unsupported relocs and relocs
that cannot be generated at the moment.

Diff Detail

Event Timeline

dsanders updated this revision to Diff 26968.Jun 2 2015, 6:39 AM
dsanders retitled this revision from to [mips][ias] Expand on r238751 to cover as many relocs as possible..
dsanders updated this object.
dsanders edited the test plan for this revision. (Show Details)
dsanders added a reviewer: vkalintiris.
dsanders added subscribers: rafael, Unknown Object (MLST).
vkalintiris accepted this revision.Jun 15 2015, 6:21 AM
vkalintiris edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Jun 15 2015, 6:21 AM
dsanders closed this revision.Jun 16 2015, 6:50 AM
lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp