summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-07-29 20:40:37 +0000
committerLang Hames <lhames@gmail.com>2014-07-29 20:40:37 +0000
commit480763f814eef6e983eb1042f6c294a1501005a5 (patch)
treed7498666f952e599478b0b49d3b68bd56cab68d8 /llvm/test/ExecutionEngine
parent24412b1420f61ad1163cbc53bae4f3eee4117b95 (diff)
downloadbcm5719-llvm-480763f814eef6e983eb1042f6c294a1501005a5.tar.gz
bcm5719-llvm-480763f814eef6e983eb1042f6c294a1501005a5.zip
[MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather than
full paths for its first argument. This allows us to remove the annoying sed lines in the test cases, and write direct references to file names in stub_addr calls (rather than <filename> placeholders). llvm-svn: 214211
Diffstat (limited to 'llvm/test/ExecutionEngine')
-rw-r--r--llvm/test/ExecutionEngine/RuntimeDyld/AArch64/MachO_ARM64_relocations.s10
-rw-r--r--llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s7
2 files changed, 7 insertions, 10 deletions
diff --git a/llvm/test/ExecutionEngine/RuntimeDyld/AArch64/MachO_ARM64_relocations.s b/llvm/test/ExecutionEngine/RuntimeDyld/AArch64/MachO_ARM64_relocations.s
index 4713c118e12..29c95e6ce35 100644
--- a/llvm/test/ExecutionEngine/RuntimeDyld/AArch64/MachO_ARM64_relocations.s
+++ b/llvm/test/ExecutionEngine/RuntimeDyld/AArch64/MachO_ARM64_relocations.s
@@ -1,6 +1,5 @@
# RUN: llvm-mc -triple=arm64-apple-ios7.0.0 -code-model=small -relocation-model=pic -filetype=obj -o %T/foo.o %s
-# RUN: sed "s,<filename>,%/T/foo.o,g" %s > %T/foo.s
-# RUN: llvm-rtdyld -triple=arm64-apple-ios7.0.0 -verify -check=%T/foo.s %/T/foo.o
+# RUN: llvm-rtdyld -triple=arm64-apple-ios7.0.0 -verify -check=%s %/T/foo.o
.section __TEXT,__text,regular,pure_instructions
.ios_version_min 7, 0
@@ -39,15 +38,14 @@ ldr1:
ldr x0, [x0, _ptr@PAGEOFF]
ret
-
# Test ARM64_RELOC_GOT_LOAD_PAGE21 and ARM64_RELOC_GOT_LOAD_PAGEOFF12
# relocation. adrp encodes the PC-relative page (4 KiB) difference between the
# adrp instruction and the GOT entry for ptr. ldr encodes the offset of the GOT
# entry within the page. The ldr instruction perfroms an implicit shift on the
# encoded immediate (imm<<3).
-# rtdyld-check: *{8}(stub_addr(<filename>, __text, _ptr)) = _ptr
-# rtdyld-check: decode_operand(adrp2, 1) = (stub_addr(<filename>, __text, _ptr)[32:12] - adrp2[32:12])
-# rtdyld-check: decode_operand(ldr2, 2) = stub_addr(<filename>, __text, _ptr)[11:3]
+# rtdyld-check: *{8}(stub_addr(foo.o, __text, _ptr)) = _ptr
+# rtdyld-check: decode_operand(adrp2, 1) = (stub_addr(foo.o, __text, _ptr)[32:12] - adrp2[32:12])
+# rtdyld-check: decode_operand(ldr2, 2) = stub_addr(foo.o, __text, _ptr)[11:3]
.globl _test_adrp_ldr
.align 2
_test_got_adrp_ldr:
diff --git a/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s b/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s
index 728d0739673..cbaadacbce5 100644
--- a/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s
+++ b/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s
@@ -1,6 +1,5 @@
# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -relocation-model=pic -filetype=obj -o %T/foo.o %s
-# RUN: sed "s,<filename>,%/T/foo.o,g" %s > %T/foo.s
-# RUN: llvm-rtdyld -triple=x86_64-apple-macosx10.9 -verify -check=%T/foo.s %/T/foo.o
+# RUN: llvm-rtdyld -triple=x86_64-apple-macosx10.9 -verify -check=%s %/T/foo.o
.section __TEXT,__text,regular,pure_instructions
.globl foo
@@ -24,8 +23,8 @@ insn2:
# Test PC-rel GOT relocation.
# Verify both the contents of the GOT entry for y, and that the movq instruction
# references the correct GOT entry address:
-# rtdyld-check: *{8}(stub_addr(<filename>, __text, y)) = y
-# rtdyld-check: decode_operand(insn3, 4) = stub_addr(<filename>, __text, y) - next_pc(insn3)
+# rtdyld-check: *{8}(stub_addr(foo.o, __text, y)) = y
+# rtdyld-check: decode_operand(insn3, 4) = stub_addr(foo.o, __text, y) - next_pc(insn3)
insn3:
movq y@GOTPCREL(%rip), %rax
OpenPOWER on IntegriCloud