Skip to content

Commit 8f1db0c

Browse files
[AIX] Implement LR prolog/epilog save/restore
Summary: This patch fixes the offsets of fields in the stack frame linkage save area for AIX. Reviewers: sfertile, hubert.reinterpretcast, jasonliu, Xiangling_L, xingxue, ZarkoCA, daltenty Reviewed By: hubert.reinterpretcast Subscribers: wuzish, nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64424 Patch by Chris Bowler! llvm-svn: 368691
1 parent f635e28 commit 8f1db0c

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

llvm/test/CodeGen/PowerPC/aix-lr.ll

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff < %s | \
2+
; RUN: FileCheck --check-prefix=32BIT %s
3+
4+
; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff < %s | \
5+
; RUN: FileCheck --check-prefix=64BIT %s
6+
7+
define void @bar() {
8+
entry:
9+
10+
; 32BIT: mflr 0
11+
; 32BIT: stw 0, 8(1)
12+
; 32BIT: stwu 1, -64(1)
13+
; 32BIT: bl .foo
14+
; 32BIT: nop
15+
; 32BIT: addi 1, 1, 64
16+
; 32BIT: lwz 0, 8(1)
17+
; 32BIT: mtlr 0
18+
19+
; 64BIT: mflr 0
20+
; 64BIT: std 0, 16(1)
21+
; 64BIT: stdu 1, -112(1)
22+
; 64BIT: bl .foo
23+
; 64BIT: nop
24+
; 64BIT: addi 1, 1, 112
25+
; 64BIT: ld 0, 16(1)
26+
; 64BIT: mtlr 0
27+
28+
call void bitcast (void (...)* @foo to void ()*)()
29+
ret void
30+
}
31+
32+
declare void @foo(...)

0 commit comments

Comments
 (0)