forked from rust-lang/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PowerPC][AIX] Update save/restore offset for frame and base pointers.
General purpose registers 30 and 31 are handled differently when they are reserved as the base-pointer and frame-pointer respectively. This fixes the offset of their fixed-stack objects when there are fpr calle-saved registers. Differential Revision: https://reviews.llvm.org/D85850
- Loading branch information
Showing
3 changed files
with
44 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
llvm/test/CodeGen/PowerPC/aix-framepointer-save-restore.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \ | ||
; RUN: -mtriple=powerpc-ibm-aix-xcoff | \ | ||
; RUN: FileCheck %s -check-prefix=AIX32 | ||
|
||
; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \ | ||
; RUN: -mtriple=powerpc64-ibm-aix-xcoff | \ | ||
; RUN: FileCheck %s -check-prefixes=AIX64 | ||
|
||
declare void @clobber(i32*) | ||
|
||
define dso_local float @frameptr_only(i32 %n, float %f) { | ||
entry: | ||
%0 = alloca i32, i32 %n | ||
call void @clobber(i32* %0) | ||
ret float %f | ||
} | ||
|
||
; AIX32: stw 31, -12(1) | ||
; AIX32: stwu 1, -80(1) | ||
; AIX32: lwz 1, 0(1) | ||
; AIX32: lwz 31, -12(1) | ||
|
||
; AIX64: std 31, -16(1) | ||
; AIX64: stdu 1, -144(1) | ||
; AIX64: ld 1, 0(1) | ||
; AIX64: ld 31, -16(1) | ||
|