[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)
commitb3fa233048eb74109d0274bda43e3a829950d4e8
tree721c8f3dcca84b51668bcc0cb1aeb45c319baf7c
parentff87630a77a49b43cc4c91cd0ad70d2b4e2de63d
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209514 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
test/MC/Mips/llvm-mc-fixup-endianness.s [new file with mode: 0644]
test/MC/Mips/mips_directives.s
test/MC/Mips/mips_gprel16.s
test/MC/Mips/msa/test_cbranch.s