[PATCH] D16096: [RuntimeDyld] Provide initial tests for small code models on ELF

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 16:25:15 PST 2016


davide created this revision.
davide added a reviewer: lhames.
davide added a subscriber: llvm-commits.

http://reviews.llvm.org/D16096

Files:
  test/ExecutionEngine/RuntimeDyld/X86/ELF_x86-64_PIC-small-relocations.s

Index: test/ExecutionEngine/RuntimeDyld/X86/ELF_x86-64_PIC-small-relocations.s
===================================================================
--- test/ExecutionEngine/RuntimeDyld/X86/ELF_x86-64_PIC-small-relocations.s
+++ test/ExecutionEngine/RuntimeDyld/X86/ELF_x86-64_PIC-small-relocations.s
@@ -0,0 +1,15 @@
+# RUN: llvm-mc -triple=x86_64-unknown-freebsd -code-model=small -relocation-model=pic -filetype=obj -o %T/testsmall_x86-64.o %s
+# RUN: llvm-rtdyld -triple=x86_64-unknown-freebsd -verify -check=%s %/T/testsmall_x86-64.o
+
+       .globl  foo
+       .align  4, 0x90
+foo:
+        retq
+
+       .globl  main
+       .align  4, 0x90
+main:
+# Test PC-rel branch.
+# rtdyld-check: decode_operand(insn1, 0) = foo - next_pc(insn1)
+insn1:
+        callq  foo


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16096.44579.patch
Type: text/x-patch
Size: 773 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160112/64f38b75/attachment.bin>


More information about the llvm-commits mailing list