1// This test checks that references to the middle of CI from other function 2// are handled properly 3 4// RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o 5// RUN: %clang %cflags --target=aarch64-unknown-linux %t.o -o %t.exe -Wl,-q 6// RUN: llvm-bolt %t.exe -o %t.bolt -lite=false 7// RUN: llvm-objdump -d -j .text %t.bolt | FileCheck %s 8 9// CHECK: deadbeef 10// CHECK-NEXT: deadbeef 11// CHECK-NEXT: [[#%x,ADDR:]]: deadbeef 12// CHECK-NEXT: deadbeef 13// CHECK: <func>: 14// CHECK-NEXT: ldr x0, 0x[[#ADDR]] 15// CHECK-NEXT: ret 16 17.type funcWithIsland, %function 18funcWithIsland: 19 ret 20 .word 0xdeadbeef 21 .word 0xdeadbeef 22 .word 0xdeadbeef 23 .word 0xdeadbeef 24.size funcWithIsland, .-funcWithIsland 25 26.type func, %function 27func: 28 ldr x0, funcWithIsland + 12 29 ret 30.size func, .-func 31 32.global main 33.type main, %function 34main: 35 bl funcWithIsland 36 bl func 37 mov w8, #93 38 svc #0 39.size main, .-main 40