[SLP]Reduce number of alternate instruction, where possible
[llvm-project.git] / llvm / test / ExecutionEngine / JITLink / x86-64 / ELF_R_X86_64_8.s
blobd5337682f809bf709a5f0dfce1407789e553bd9f
1 # RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent \
2 # RUN: -filetype=obj -o %t.o %s
3 # RUN: llvm-jitlink -noexec -abs X=0x12 -check=%s %t.o
4 # RUN: not llvm-jitlink -noexec -abs X=0x123 %t.o 2>&1 | \
5 # RUN: FileCheck -check-prefix=CHECK-ERROR %s
7 # Check success and failure cases of R_X86_64_16 handling.
9 # jitlink-check: *{8}P = X
11 # CHECK-ERROR: relocation target "X" {{.*}} is out of range of Pointer8 fixup
13 .text
14 .section .text.main,"ax",@progbits
15 .globl main
16 .p2align 4, 0x90
17 .type main,@function
18 main:
19 xorl %eax, %eax
20 retq
21 .Lfunc_end0:
22 .size main, .Lfunc_end0-main
24 .type P,@object
25 .data
26 .globl P
28 .byte X # Using byte here generates R_X86_64_8.
29 .byte 0
30 .byte 0
31 .byte 0
32 .byte 0
33 .byte 0
34 .byte 0
35 .byte 0
36 .size P, 8