[mips][ias] Expand on r238751 to cover as many relocs as possible.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 16 Jun 2015 13:46:26 +0000 (13:46 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 16 Jun 2015 13:46:26 +0000 (13:46 +0000)
commit58405d856e28d3bccb505c7165c06e2b52d745bd
tree1a741187e749243fd56afd55198689fee673b1b6
parent34688f2f7e63e731cf77a55aed38d409c8f09215
[mips][ias] Expand on r238751 to cover as many relocs as possible.

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.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits, rafael

Differential Revision: http://reviews.llvm.org/D10184

llvm-svn: 239817
llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
llvm/test/MC/Mips/mips-relocations.s [deleted file]
llvm/test/MC/Mips/relocation.s