2019-05-24 22:54:35 +02:00
|
|
|
; RUN: llc -mtriple powerpc-ibm-aix-xcoff -stop-after=machine-cp < %s | \
|
|
|
|
; RUN: FileCheck --check-prefix=32BIT %s
|
|
|
|
|
|
|
|
; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -stop-after=machine-cp < %s | \
|
|
|
|
; RUN: FileCheck --check-prefix=64BIT %s
|
|
|
|
|
2019-07-26 19:25:27 +02:00
|
|
|
; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s
|
|
|
|
; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s
|
|
|
|
|
2019-05-24 22:54:35 +02:00
|
|
|
declare void @foo(...)
|
|
|
|
|
|
|
|
define void @test_call() {
|
|
|
|
entry:
|
|
|
|
; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
|
2019-06-06 21:13:36 +02:00
|
|
|
; 32BIT: BL_NOP <mcsymbol .foo>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r2, implicit-def $r1
|
2019-05-24 22:54:35 +02:00
|
|
|
; 32BIT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
|
|
|
|
|
|
|
|
; 64BIT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
|
2020-04-07 15:57:56 +02:00
|
|
|
; 64BIT: BL8_NOP <mcsymbol .foo>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x2, implicit-def $r1
|
2019-05-24 22:54:35 +02:00
|
|
|
; 64BIT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
|
|
|
|
|
2019-07-26 19:25:27 +02:00
|
|
|
; CHECK-LABEL: test_call
|
|
|
|
; CHECK: bl .foo
|
|
|
|
; CHECK-NEXT: nop
|
|
|
|
|
2019-05-24 22:54:35 +02:00
|
|
|
call void bitcast (void (...)* @foo to void ()*)()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define hidden void @foo_local() {
|
|
|
|
entry:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @test_local_call() {
|
|
|
|
entry:
|
|
|
|
; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
|
2019-06-06 21:13:36 +02:00
|
|
|
; 32BIT: BL <mcsymbol .foo_local>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r2, implicit-def $r1
|
2019-05-24 22:54:35 +02:00
|
|
|
; 32BIT: ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
|
|
|
|
|
|
|
|
; 64BIT: ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
|
2020-04-07 15:57:56 +02:00
|
|
|
; 64BIT: BL8 <mcsymbol .foo_local>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x2, implicit-def $r1
|
2019-05-24 22:54:35 +02:00
|
|
|
; 64BIT: ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
|
|
|
|
|
2019-07-26 19:25:27 +02:00
|
|
|
; CHECK-LABEL: test_local_call
|
|
|
|
; CHECK: bl .foo_local
|
|
|
|
; CHECK-NOT: nop
|
|
|
|
|
2019-05-24 22:54:35 +02:00
|
|
|
call void @foo_local()
|
|
|
|
ret void
|
|
|
|
}
|