[RuntimeDyld] Make sure that RuntimeDyld regression tests only run for targets
[oota-llvm.git] / test / ExecutionEngine / RuntimeDyld / X86 / MachO_x86-64_PIC_relocations.s
1 # RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -relocation-model=pic -filetype=obj -o %s.o %s
2 # RUN: llvm-rtdyld -triple=x86_64-apple-macosx10.9 -verify -check=%s %s.o
3 # RUN: rm %s.o
4
5         .section        __TEXT,__text,regular,pure_instructions
6         .globl  foo
7         .align  4, 0x90
8 foo:
9         retq
10
11         .globl  main
12         .align  4, 0x90
13 main:
14 # Test PC-rel branch.
15 # rtdyld-check: decode_operand(insn1, 0) = foo - next_pc(insn1)
16 insn1:
17         callq   foo
18
19 # Test PC-rel signed.
20 # rtdyld-check: decode_operand(insn2, 4) = x - next_pc(insn2)
21 insn2:
22         movl    x(%rip), %eax
23         movl    $0, %eax
24         retq
25
26         .section        __DATA,__data
27         .globl  x
28         .align  2
29 x:
30         .long   5
31
32 .subsections_via_symbols