1 ; RUN: llc %s -mtriple=armv7-linux-gnueabi -o - | \
2 ; RUN: FileCheck -check-prefix=ELFASM %s
3 ; RUN: llc %s -mtriple=armv7-linux-gnueabi -filetype=obj -o - | \
4 ; RUN: llvm-readobj -S --sd | FileCheck -check-prefix=ELFOBJ %s
6 ;; Make sure that bl __aeabi_read_tp is materialized and fixed up correctly
9 @i = external thread_local global i32
10 @a = external global i8
11 @b = external global [10 x i8]
13 define arm_aapcs_vfpcc i32 @main() nounwind {
15 %0 = load i32, i32* @i, align 4
16 switch i32 %0, label %bb2 [
22 %1 = tail call arm_aapcs_vfpcc i32 @foo(i8* @a) nounwind
24 ; ELFASM: bl __aeabi_read_tp
30 ; ELFOBJ: SectionData (
31 ;;; BL __aeabi_read_tp is ---------+
33 ; ELFOBJ-NEXT: 0000: 00482DE9 3C009FE5 00109FE7 FEFFFFEB
37 %2 = tail call arm_aapcs_vfpcc i32 @bar(i32* bitcast ([10 x i8]* @b to i32*)) nounwind
44 declare arm_aapcs_vfpcc i32 @foo(i8*)
46 declare arm_aapcs_vfpcc i32 @bar(i32*)