87 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc %s -mtriple=thumbv7-linux-gnueabi -o - | \3; RUN: FileCheck -check-prefix=ELFASM %s4; RUN: llc %s -mtriple=thumbebv7-linux-gnueabi -o - | \5; RUN: FileCheck -check-prefix=ELFASM %s6; RUN: llc %s -mtriple=thumbv7-linux-gnueabi -filetype=obj -o - | \7; RUN: llvm-readobj -S --sd - | FileCheck -check-prefix=ELFOBJ -check-prefix=ELFOBJ-LE %s8; RUN: llc %s -mtriple=thumbebv7-linux-gnueabi -filetype=obj -o - | \9; RUN: llvm-readobj -S --sd - | FileCheck -check-prefix=ELFOBJ -check-prefix=ELFOBJ-BE %s10 11;; Make sure that bl __aeabi_read_tp is materialized and fixed up correctly12;; in the obj case.13 14@i = external thread_local global i3215@a = external global i816@b = external global [10 x i8]17 18define arm_aapcs_vfpcc i32 @main() nounwind {19; ELFASM-LABEL: main:20; ELFASM: @ %bb.0: @ %entry21; ELFASM-NEXT: .save {r7, lr}22; ELFASM-NEXT: push {r7, lr}23; ELFASM-NEXT: ldr r0, .LCPI0_024; ELFASM-NEXT: .LPC0_0:25; ELFASM-NEXT: add r0, pc26; ELFASM-NEXT: ldr r1, [r0]27; ELFASM-NEXT: bl __aeabi_read_tp28; ELFASM-NEXT: ldr r0, [r0, r1]29; ELFASM-NEXT: cmp r0, #1230; ELFASM-NEXT: beq .LBB0_331; ELFASM-NEXT: @ %bb.1: @ %entry32; ELFASM-NEXT: cmp r0, #1333; ELFASM-NEXT: itt ne34; ELFASM-NEXT: movne.w r0, #-135; ELFASM-NEXT: popne {r7, pc}36; ELFASM-NEXT: .LBB0_2: @ %bb137; ELFASM-NEXT: movw r0, :lower16:b38; ELFASM-NEXT: movt r0, :upper16:b39; ELFASM-NEXT: pop.w {r7, lr}40; ELFASM-NEXT: b bar41; ELFASM-NEXT: .LBB0_3: @ %bb42; ELFASM-NEXT: movw r0, :lower16:a43; ELFASM-NEXT: movt r0, :upper16:a44; ELFASM-NEXT: pop.w {r7, lr}45; ELFASM-NEXT: b foo46; ELFASM-NEXT: .p2align 247; ELFASM-NEXT: @ %bb.4:48; ELFASM-NEXT: .LCPI0_0:49; ELFASM-NEXT: .Ltmp0:50; ELFASM-NEXT: .long i(GOTTPOFF)-(.LPC0_0+4-.Ltmp0)51entry:52 %0 = load i32, ptr @i, align 453 switch i32 %0, label %bb2 [54 i32 12, label %bb55 i32 13, label %bb156 ]57 58bb: ; preds = %entry59 %1 = tail call arm_aapcs_vfpcc i32 @foo(ptr @a) nounwind60 ret i32 %161 62 63; ELFOBJ: Sections [64; ELFOBJ: Section {65; ELFOBJ: Name: .text66; ELFOBJ-LE: SectionData (67;;; BL __aeabi_read_tp is ---+68;;; V69; ELFOBJ-LE-NEXT: 0000: 80B50E48 78440168 FFF7FEFF 40580C2870; ELFOBJ-BE: SectionData (71;;; BL __aeabi_read_tp is ---+72;;; V73; ELFOBJ-BE-NEXT: 0000: B580480E 44786801 F7FFFFFE 5840280C74 75 76bb1: ; preds = %entry77 %2 = tail call arm_aapcs_vfpcc i32 @bar(ptr @b) nounwind78 ret i32 %279 80bb2: ; preds = %entry81 ret i32 -182}83 84declare arm_aapcs_vfpcc i32 @foo(ptr)85 86declare arm_aapcs_vfpcc i32 @bar(ptr)87