summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorPetar Jovanovic <petar.jovanovic@imgtec.com>2015-08-28 18:02:53 +0000
committerPetar Jovanovic <petar.jovanovic@imgtec.com>2015-08-28 18:02:53 +0000
commit207a191a9824cab91c39fc106cb27543883d17f3 (patch)
tree6276722c737957a9d411f773d7f8e333caa5d5b4 /llvm/lib
parent8b0583ef1be53849546f76f8dcb60c031c64abb3 (diff)
downloadbcm5719-llvm-207a191a9824cab91c39fc106cb27543883d17f3.tar.gz
bcm5719-llvm-207a191a9824cab91c39fc106cb27543883d17f3.zip
[mips64][mcjit] Add N64R6 relocations tests and fix N64R2 tests
This patch adds a test for MIPS64R6 relocations, it corrects check expressions for R_MIPS_26 and R_MIPS_PC16 relocations in MIPS64R2 test, and it adds run for big endian in MIPS64R2 test. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D11217 llvm-svn: 246311
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index 7dc94e36d82..d9b02cc49b2 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -684,11 +684,11 @@ RuntimeDyldELF::evaluateMIPS64Relocation(const SectionEntry &Section,
}
case ELF::R_MIPS_PC18_S3: {
uint64_t FinalAddress = (Section.LoadAddress + Offset);
- return ((Value + Addend - ((FinalAddress | 7) ^ 7)) >> 3) & 0x3ffff;
+ return ((Value + Addend - (FinalAddress & ~0x7)) >> 3) & 0x3ffff;
}
case ELF::R_MIPS_PC19_S2: {
uint64_t FinalAddress = (Section.LoadAddress + Offset);
- return ((Value + Addend - FinalAddress) >> 2) & 0x7ffff;
+ return ((Value + Addend - (FinalAddress & ~0x3)) >> 2) & 0x7ffff;
}
case ELF::R_MIPS_PC21_S2: {
uint64_t FinalAddress = (Section.LoadAddress + Offset);
OpenPOWER on IntegriCloud