[clang-format] Rename ExportBlockIndentation -> IndentExportBlock (#123493)
[llvm-project.git] / bolt / test / X86 / fptr-addend-pcrel.s
blob054d177ed55fe015118b153ac996c8bb25b24aec
1 ## Check that BOLT correctly recognizes pc-relative function pointer
2 ## reference with an addend.
4 # REQUIRES: system-linux
6 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
7 # RUN: llvm-strip --strip-unneeded %t.o
8 # RUN: ld.lld %t.o -o %t.exe -q
9 # RUN: llvm-bolt %t.exe --relocs -o %t.null --print-only=foo --print-disasm \
10 # RUN: | FileCheck %s
12 .text
13 .globl _start
14 .type _start,@function
15 _start:
16 .cfi_startproc
17 call foo
18 retq
19 .size _start, .-_start
20 .cfi_endproc
22 .globl foo
23 .type foo,@function
24 foo:
25 .cfi_startproc
27 leaq foo-1(%rip), %rax
28 ## Check that the instruction references foo with a negative addend,
29 ## not the previous function with a positive addend (_start+X).
31 # CHECK: leaq foo-1(%rip), %rax
33 retq
34 .size foo, .-foo
35 .cfi_endproc