[Mips] Fix evaluating J-format branch targets
J/JAL/JALX/JALS are absolute branches, but stay within the current 256 MB-aligned region, so we must include the high bits of the instruction address when calculating the branch target. Patch by James Clarke. Differential Revision: https://reviews.llvm.org/D68548 llvm-svn: 373906
Showing
- llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp 7 additions, 4 deletionsllvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
- llvm/test/MC/Mips/micromips-jump-pc-region.s 17 additions, 0 deletionsllvm/test/MC/Mips/micromips-jump-pc-region.s
- llvm/test/MC/Mips/mips-jump-pc-region.s 17 additions, 0 deletionsllvm/test/MC/Mips/mips-jump-pc-region.s
llvm/test/MC/Mips/micromips-jump-pc-region.s
0 → 100644
llvm/test/MC/Mips/mips-jump-pc-region.s
0 → 100644
Please register or sign in to comment