brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 6401c84 Raw
78 lines · plain
1; RUN: llc -O0 < %s -mtriple armv7-linux-gnueabi -o - \2; RUN:   | llvm-mc -triple armv7-linux-gnueabi -filetype=obj -o - \3; RUN:    | llvm-readobj -r - | FileCheck --check-prefix LINUX %s4 5; RUN: llc -O0 < %s -mtriple armv7-linux-android -o - \6; RUN:   | llvm-mc -triple armv7-linux-android -filetype=obj -o - \7; RUN:    | llvm-readobj -r - | FileCheck --check-prefix LINUX %s8 9 10; RUN: llc -O0 < %s -mtriple armv7-apple-ios -o - \11; RUN:   | llvm-mc -triple armv7-apple-ios -filetype=obj -o - \12; RUN:    | llvm-readobj -r - | FileCheck --check-prefix IOS %s13 14 15define void @thumb_caller() #0 {16  call void @internal_arm_fn()17  call void @global_arm_fn()18  call void @internal_thumb_fn()19  call void @global_thumb_fn()20  ret void21}22 23define void @arm_caller() #1 {24  call void @internal_arm_fn()25  call void @global_arm_fn()26  call void @internal_thumb_fn()27  call void @global_thumb_fn()28  ret void29}30 31define internal void @internal_thumb_fn() #0 {32  ret void33}34 35define void @global_thumb_fn() #0 {36entry:37  br label %end38end:39  br label %end40  ret void41}42 43define internal void @internal_arm_fn() #1 {44  ret void45}46 47define void @global_arm_fn() #1 {48entry:49  br label %end50end:51  br label %end52  ret void53}54 55attributes #0 = { "target-features"="+thumb-mode" }56attributes #1 = { "target-features"="-thumb-mode" }57 58; LINUX: Section (3) .rel.text {59; LINUX-NEXT: 0x2 R_ARM_THM_CALL internal_arm_fn60; LINUX-NEXT: 0x6 R_ARM_THM_CALL global_arm_fn61; LINUX-NEXT: 0xE R_ARM_THM_CALL global_thumb_fn62; LINUX-NEXT: 0x1C R_ARM_CALL internal_arm_fn63; LINUX-NEXT: 0x20 R_ARM_CALL global_arm_fn64; LINUX-NEXT: 0x24 R_ARM_CALL internal_thumb_fn65; LINUX-NEXT: 0x28 R_ARM_CALL global_thumb_fn66; LINUX-NEXT: }67 68; IOS:   Section __text {69; IOS-NEXT: 0x2C 1 2 1 ARM_RELOC_BR24 0 _global_thumb_fn70; IOS-NEXT: 0x28 1 2 1 ARM_RELOC_BR24 0 _internal_thumb_fn71; IOS-NEXT: 0x24 1 2 1 ARM_RELOC_BR24 0 _global_arm_fn72; IOS-NEXT: 0x20 1 2 1 ARM_RELOC_BR24 0 _internal_arm_fn73; IOS-NEXT: 0x10 1 2 0 ARM_THUMB_RELOC_BR22 0 __text74; IOS-NEXT: 0xC 1 2 0 ARM_THUMB_RELOC_BR22 0 __text75; IOS-NEXT: 0x8 1 2 0 ARM_THUMB_RELOC_BR22 0 __text76; IOS-NEXT: 0x4 1 2 0 ARM_THUMB_RELOC_BR22 0 __text77; IOS-NEXT: }78