[mips] Work around inconsistency in llvm-mc's placement of fixup markers
authorDaniel Sanders <daniel.sanders@imgtec.com>
Fri, 23 May 2014 13:35:24 +0000 (13:35 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Fri, 23 May 2014 13:35:24 +0000 (13:35 +0000)
commit683ed961e10ac36ad747968335cbda14fd4a2f6f
tree9843dc92143968fed59ea7ba50032255f6ab012f
parent8966caab05422fb8c979259cea3b0cc030d03848
[mips] Work around inconsistency in llvm-mc's placement of fixup markers

Summary:
Add a second fixup table to MipsAsmBackend::getFixupKindInfo() to correctly
position llvm-mc's fixup placeholders for big-endian.

See PR19836 for full details of the issue. To summarize, the fixup placeholders
do not account for endianness properly and the implementations of
getFixupKindInfo() for each target are measuring MCFixupKindInfo.TargetOffset
from different ends of the instruction encoding to compensate.

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: vmedic

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

llvm-svn: 209514
llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
llvm/test/MC/Mips/llvm-mc-fixup-endianness.s [new file with mode: 0644]
llvm/test/MC/Mips/mips_directives.s
llvm/test/MC/Mips/mips_gprel16.s
llvm/test/MC/Mips/msa/test_cbranch.s