llvm-6502/lib
Hal Finkel fe47bf8fa0 PPC: Implement base pointer and stack realignment
This builds on some frame-lowering code that has existed since 2005 (r24224)
but was disabled in 2008 (r48188) because it needed base pointer support to
function correctly. This implementation follows the strategy suggested by Dale
Johannesen in r48188 where the following comment was added:

  This does not currently work, because the delta between old and new stack
  pointers is added to offsets that reference incoming parameters after the
  prolog is generated, and the code that does that doesn't handle a variable
  delta.  You don't want to do that anyway; a better approach is to reserve
  another register that retains to the incoming stack pointer, and reference
  parameters relative to that.

And now we do exactly that. If we don't need a frame pointer, then we use r31
as a base pointer. If we do need a frame pointer, then we use r30 as a base
pointer. The base pointer retains the value of the stack pointer before it was
decremented in the prologue. We then use the base pointer to resolve all
negative frame indicies. The basic scheme follows that for base pointers in the
X86 backend.

We use a base pointer when we need to dynamically realign the incoming stack
pointer. This currently applies only to static objects (dynamic allocas with
large alignments, and base-pointer support in SjLj lowering will come in future
commits).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186478 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-17 00:45:52 +00:00
..
Analysis Add 'const' qualifiers to static const char* variables. 2013-07-16 01:17:10 +00:00
AsmParser Target/X86: Add explicit Win64 and System V/x86-64 calling conventions. 2013-07-12 06:02:35 +00:00
Bitcode Add a wrapper for open. 2013-07-16 19:44:17 +00:00
CodeGen Add getModuleFlag(StringRef Key) to query a module flag given Key. 2013-07-16 23:21:16 +00:00
DebugInfo DebugInfo: Factor out parsing compile unit DIEs to a separate function. Improve code style and comments. 2013-07-15 08:43:35 +00:00
ExecutionEngine Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size. 2013-07-04 01:31:24 +00:00
IR Add getModuleFlag(StringRef Key) to query a module flag given Key. 2013-07-16 23:21:16 +00:00
IRReader Add 'const' qualifiers to static const char* variables. 2013-07-16 01:17:10 +00:00
Linker
MC Add a wrapper for open. 2013-07-16 19:44:17 +00:00
Object Add 'const' qualifiers to static const char* variables. 2013-07-16 01:17:10 +00:00
Option Revert "[Option] Store arg strings in a set backed by a BumpPtrAllocator" 2013-07-15 16:40:52 +00:00
Support Add a wrapper for open. 2013-07-16 19:44:17 +00:00
TableGen
Target PPC: Implement base pointer and stack realignment 2013-07-17 00:45:52 +00:00
Transforms flip the scev minus direction to simplify the code. 2013-07-16 22:57:06 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile