summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2016-07-14 17:27:06 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2016-07-14 17:27:06 +0000
commit0233cc55dea5e55fe2163fa1e3ac5e2aee30342c (patch)
tree4a816e072292f0d6beeed6c9bccf60ba7d03a864 /llvm/test/ExecutionEngine
parentefbf9c8d5a338488c68782f06e41f21fddf7b36a (diff)
downloadbcm5719-llvm-0233cc55dea5e55fe2163fa1e3ac5e2aee30342c.tar.gz
bcm5719-llvm-0233cc55dea5e55fe2163fa1e3ac5e2aee30342c.zip
X86: handle external tail calls in Windows JIT
If there was a tail call, we would incorrectly handle the relocation. It would end up indexing into the array with an incorrect section id. The symbol was external to the module, so the Section ID was UNDEFINED (-1). We would then index the SmallVector with this ID, triggering an assertion. Use the Value rather than the section load address in this case. llvm-svn: 275442
Diffstat (limited to 'llvm/test/ExecutionEngine')
-rw-r--r--llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_i386.s6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_i386.s b/llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_i386.s
index c2273da63dd..ddf154e4320 100644
--- a/llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_i386.s
+++ b/llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_i386.s
@@ -1,5 +1,5 @@
// RUN: llvm-mc -triple i686-windows -filetype obj -o %t.obj %s
-// RUN: llvm-rtdyld -triple i686-windows -dummy-extern _OutputDebugStringA@4=0xfffffffe -dummy-extern _ExitProcess@4=0xffffffff -verify -check=%s %t.obj
+// RUN: llvm-rtdyld -triple i686-windows -dummy-extern _printf=0xfffffffd -dummy-extern _OutputDebugStringA@4=0xfffffffe -dummy-extern _ExitProcess@4=0xffffffff -verify -check=%s %t.obj
.text
@@ -13,7 +13,9 @@ rel1:
call _function // IMAGE_REL_I386_REL32
# rtdyld-check: decode_operand(rel1, 0) = (_function-_main-4-1)
xorl %eax, %eax
- retl
+rel12:
+ jmp _printf
+# rtdyld-check: decode_operand(rel12, 0)[31:0] = (_printf-_main-4-8)
.def _function
.scl 2
OpenPOWER on IntegriCloud