1 # REQUIRES: system-linux
3 ## Check that BOLT correctly processes jump table that contains function start
4 ## as one of its entries.
6 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
7 # RUN: %clang %cflags %t.o -o %t.exe -no-pie -Wl,-q
9 # RUN: llvm-bolt %t.exe --print-normalized --print-only=foo -o %t.out \
10 # RUN: |& FileCheck %s
16 .type _start, %function
22 .size _start, .-_start
30 movzbl
0x1(%rdi
), %eax
32 jmpq
*"JUMP_TABLE/foo.0"(,%rax
,8)
33 # CHECK: jmpq {{.*}} # JUMPTABLE
34 # CHECK-NEXT: Successors: {{.*}}, {{.*}}, {{.*}}, {{.*}}, {{.*}}
50 movzbl
0x14(%rdi
), %eax
67 # CHECK: Jump table {{.*}} for function foo
68 # CHECK-NEXT: 0x{{.*}} :
69 # CHECK-NEXT: 0x{{.*}} :
70 # CHECK-NEXT: 0x{{.*}} :
71 # CHECK-NEXT: 0x{{.*}} :
72 # CHECK-NEXT: 0x{{.*}} :