]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commit
[XCore] Fix handling of functions where only the LR is spilled.
authorRichard Osborne <richard@xmos.com>
Thu, 9 May 2013 16:43:42 +0000 (16:43 +0000)
committerRichard Osborne <richard@xmos.com>
Thu, 9 May 2013 16:43:42 +0000 (16:43 +0000)
commit9bd913c4c1f350562b5a31e79a82dcaf143b06e0
treeca26859c9bf1bc2ce13ec89da6450919c73c7224
parenta6ff92a975f2d6ef6a0db7aeaee3ee9fd046307a
[XCore] Fix handling of functions where only the LR is spilled.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181520 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/XCore/XCoreFrameLowering.cpp
test/CodeGen/XCore/epilogue_prologue.ll [new file with mode: 0644]