mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
7504cb9f47
Previously we only checked if the LR required saving if the frame size was non zero. However because the caller reserves 1 word for the callee to use that doesn't count towards our frame size it is possible for the LR to need saving and for the frame size to be 0. We didn't hit when the LR needed saving because of a function calls because the 1 word of stack we must allocate for our callee means the frame size is always non zero in this case. However we can hit this case if the LR is clobbered in inline asm. llvm-svn: 181520
12 lines
229 B
LLVM
12 lines
229 B
LLVM
; RUN: llc < %s -march=xcore | FileCheck %s
|
|
|
|
; CHECK: f1
|
|
; CHECK: stw lr, sp[0]
|
|
; CHECK: ldw lr, sp[0]
|
|
; CHECK-NEXT: retsp 0
|
|
define void @f1() nounwind {
|
|
entry:
|
|
tail call void asm sideeffect "", "~{lr}"() nounwind
|
|
ret void
|
|
}
|