[mips] Add checks for alignment and maximum displacements for most of the
authorMatheus Almeida <matheus.almeida@imgtec.com>
Fri, 13 Dec 2013 11:11:02 +0000 (11:11 +0000)
committerMatheus Almeida <matheus.almeida@imgtec.com>
Fri, 13 Dec 2013 11:11:02 +0000 (11:11 +0000)
commitb90ed644fc9eaba125db767ca2f7db0efc2edd02
tree0340deb3598f49a779367713d02ee83018b182d5
parent09b39002068d9cbcb44237a2fb8b39de72b4d6cd
[mips] Add checks for alignment and maximum displacements for most of the
branch instructions for mips and micromips instruction sets thus avoiding
the situation of generating branches to undesired locations if offsets
cannot be encoded.

This patch also checks if a fixup cannot be applied and returns a fatal error
if that's the case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197223 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
test/MC/Mips/micromips-bad-branches.s [new file with mode: 0644]
test/MC/Mips/micromips-diagnostic-fixup.s [new file with mode: 0644]
test/MC/Mips/mips-bad-branches.s [new file with mode: 0644]
test/MC/Mips/mips-diagnostic-fixup.s [new file with mode: 0644]