brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.1 KiB · 290b5b8 Raw
76 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2; RUN: llc -mtriple arm-unknown -mattr=-v4t -global-isel -stop-after=irtranslator -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=NOV4T3; RUN: llc -mtriple arm-unknown -mattr=+v4t -global-isel -stop-after=irtranslator -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=V4T4; RUN: llc -mtriple arm-unknown -mattr=+v5t -global-isel -stop-after=irtranslator -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=V5T5; RUN: llc -mtriple thumb-unknown -mattr=+v6t2 -global-isel -stop-after=irtranslator -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=THUMB6 7define arm_aapcscc void @test_indirect_call(ptr %fptr) {8  ; NOV4T-LABEL: name: test_indirect_call9  ; NOV4T: bb.1.entry:10  ; NOV4T:   liveins: $r011  ; NOV4T:   [[COPY:%[0-9]+]]:tgpr(p0) = COPY $r012  ; NOV4T:   ADJCALLSTACKDOWN 0, 0, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp13  ; NOV4T:   BMOVPCRX_CALL [[COPY]](p0), csr_aapcs, implicit-def $lr, implicit $sp14  ; NOV4T:   ADJCALLSTACKUP 0, -1, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp15  ; NOV4T:   MOVPCLR 14 /* CC::al */, $noreg16  ; V4T-LABEL: name: test_indirect_call17  ; V4T: bb.1.entry:18  ; V4T:   liveins: $r019  ; V4T:   [[COPY:%[0-9]+]]:tgpr(p0) = COPY $r020  ; V4T:   ADJCALLSTACKDOWN 0, 0, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp21  ; V4T:   BX_CALL [[COPY]](p0), csr_aapcs, implicit-def $lr, implicit $sp22  ; V4T:   ADJCALLSTACKUP 0, -1, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp23  ; V4T:   BX_RET 14 /* CC::al */, $noreg24  ; V5T-LABEL: name: test_indirect_call25  ; V5T: bb.1.entry:26  ; V5T:   liveins: $r027  ; V5T:   [[COPY:%[0-9]+]]:gpr(p0) = COPY $r028  ; V5T:   ADJCALLSTACKDOWN 0, 0, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp29  ; V5T:   BLX [[COPY]](p0), csr_aapcs, implicit-def $lr, implicit $sp30  ; V5T:   ADJCALLSTACKUP 0, -1, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp31  ; V5T:   BX_RET 14 /* CC::al */, $noreg32  ; THUMB-LABEL: name: test_indirect_call33  ; THUMB: bb.1.entry:34  ; THUMB:   liveins: $r035  ; THUMB:   [[COPY:%[0-9]+]]:gpr(p0) = COPY $r036  ; THUMB:   ADJCALLSTACKDOWN 0, 0, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp37  ; THUMB:   tBLXr 14 /* CC::al */, $noreg, [[COPY]](p0), csr_aapcs, implicit-def $lr, implicit $sp38  ; THUMB:   ADJCALLSTACKUP 0, -1, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp39  ; THUMB:   tBX_RET 14 /* CC::al */, $noreg40entry:41  notail call arm_aapcscc void %fptr()42  ret void43}44 45declare arm_aapcscc void @call_target()46 47define arm_aapcscc void @test_direct_call() {48  ; NOV4T-LABEL: name: test_direct_call49  ; NOV4T: bb.1.entry:50  ; NOV4T:   ADJCALLSTACKDOWN 0, 0, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp51  ; NOV4T:   BL @call_target, csr_aapcs, implicit-def $lr, implicit $sp52  ; NOV4T:   ADJCALLSTACKUP 0, -1, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp53  ; NOV4T:   MOVPCLR 14 /* CC::al */, $noreg54  ; V4T-LABEL: name: test_direct_call55  ; V4T: bb.1.entry:56  ; V4T:   ADJCALLSTACKDOWN 0, 0, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp57  ; V4T:   BL @call_target, csr_aapcs, implicit-def $lr, implicit $sp58  ; V4T:   ADJCALLSTACKUP 0, -1, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp59  ; V4T:   BX_RET 14 /* CC::al */, $noreg60  ; V5T-LABEL: name: test_direct_call61  ; V5T: bb.1.entry:62  ; V5T:   ADJCALLSTACKDOWN 0, 0, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp63  ; V5T:   BL @call_target, csr_aapcs, implicit-def $lr, implicit $sp64  ; V5T:   ADJCALLSTACKUP 0, -1, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp65  ; V5T:   BX_RET 14 /* CC::al */, $noreg66  ; THUMB-LABEL: name: test_direct_call67  ; THUMB: bb.1.entry:68  ; THUMB:   ADJCALLSTACKDOWN 0, 0, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp69  ; THUMB:   tBL 14 /* CC::al */, $noreg, @call_target, csr_aapcs, implicit-def $lr, implicit $sp70  ; THUMB:   ADJCALLSTACKUP 0, -1, 14 /* CC::al */, $noreg, implicit-def $sp, implicit $sp71  ; THUMB:   tBX_RET 14 /* CC::al */, $noreg72entry:73  notail call arm_aapcscc void @call_target()74  ret void75}76