summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine
diff options
context:
space:
mode:
authorSagar Thakur <sagar.thakur@imgtec.com>2016-05-24 09:57:10 +0000
committerSagar Thakur <sagar.thakur@imgtec.com>2016-05-24 09:57:10 +0000
commit672c710de4aaa64a99c8bc08a67f351c1fa932d6 (patch)
tree6a1d4b436f348697b4ad3dc58dc649d57b606cf7 /llvm/test/ExecutionEngine
parent6a6185fd78a61eb2a2f05beefe17b67feed86de0 (diff)
downloadbcm5719-llvm-672c710de4aaa64a99c8bc08a67f351c1fa932d6.tar.gz
bcm5719-llvm-672c710de4aaa64a99c8bc08a67f351c1fa932d6.zip
[MIPS][LLVM-MC] Fix Disassemble of Negative Offset
Patch by Nitesh Jain. Summary: The type of Imm in MipsDisassembler.cpp was incorrect since SignExtend64 return int64_t type.As per the MIPSr6 doc ,the offset is added to the address of the instruction following the branch (not the branch itself), to form a PC-relative effective target address hence “4” is added to the offset. The offset of some test case are update to reflect the changes due to “ + 4 ” offset and new test case for negative offset are added. Reviewers: dsanders, vkalintiris Differential Revision: http://reviews.llvm.org/D17540 llvm-svn: 270542
Diffstat (limited to 'llvm/test/ExecutionEngine')
-rw-r--r--llvm/test/ExecutionEngine/RuntimeDyld/Mips/ELF_N64R6_relocations.s4
-rw-r--r--llvm/test/ExecutionEngine/RuntimeDyld/Mips/ELF_O32R6_relocations.s4
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/ExecutionEngine/RuntimeDyld/Mips/ELF_N64R6_relocations.s b/llvm/test/ExecutionEngine/RuntimeDyld/Mips/ELF_N64R6_relocations.s
index 89e1ed56a88..ecd817244c5 100644
--- a/llvm/test/ExecutionEngine/RuntimeDyld/Mips/ELF_N64R6_relocations.s
+++ b/llvm/test/ExecutionEngine/RuntimeDyld/Mips/ELF_N64R6_relocations.s
@@ -32,12 +32,12 @@ R_MIPS_PC19_S2:
lwpc $6,foo
# Test R_MIPS_PC21_S2 relocation.
-# rtdyld-check: decode_operand(R_MIPS_PC21_S2, 1)[22:0] = (foo - next_pc(R_MIPS_PC21_S2))[22:0]
+# rtdyld-check: decode_operand(R_MIPS_PC21_S2, 1)[22:0] = (foo - next_pc(R_MIPS_PC21_S2) + 0x04)[22:0]
R_MIPS_PC21_S2:
bnezc $5,foo
# Test R_MIPS_PC26_S2 relocation.
-# rtdyld-check: decode_operand(R_MIPS_PC26_S2, 0)[27:0] = (foo - next_pc(R_MIPS_PC26_S2))[27:0]
+# rtdyld-check: decode_operand(R_MIPS_PC26_S2, 0)[27:0] = (foo - next_pc(R_MIPS_PC26_S2) + 0x04)[27:0]
R_MIPS_PC26_S2:
balc foo
diff --git a/llvm/test/ExecutionEngine/RuntimeDyld/Mips/ELF_O32R6_relocations.s b/llvm/test/ExecutionEngine/RuntimeDyld/Mips/ELF_O32R6_relocations.s
index 9c843cabd62..941c8b2f916 100644
--- a/llvm/test/ExecutionEngine/RuntimeDyld/Mips/ELF_O32R6_relocations.s
+++ b/llvm/test/ExecutionEngine/RuntimeDyld/Mips/ELF_O32R6_relocations.s
@@ -27,12 +27,12 @@ R_MIPS_PC19_S2:
lwpc $6,foo
# Test R_MIPS_PC21_S2 relocation.
-# rtdyld-check: decode_operand(R_MIPS_PC21_S2, 1)[22:0] = (foo - next_pc(R_MIPS_PC21_S2))[22:0]
+# rtdyld-check: decode_operand(R_MIPS_PC21_S2, 1)[22:0] = (foo - next_pc(R_MIPS_PC21_S2) + 0x04)[22:0]
R_MIPS_PC21_S2:
bnezc $5,foo
# Test R_MIPS_PC26_S2 relocation.
-# rtdyld-check: decode_operand(R_MIPS_PC26_S2, 0)[27:0] = (foo - next_pc(R_MIPS_PC26_S2))[27:0]
+# rtdyld-check: decode_operand(R_MIPS_PC26_S2, 0)[27:0] = (foo - next_pc(R_MIPS_PC26_S2) + 0x04)[27:0]
R_MIPS_PC26_S2:
balc foo
OpenPOWER on IntegriCloud