[mips] Add support for dynamic stack realignment.
authorVasileios Kalintiris <Vasileios.Kalintiris@imgtec.com>
Tue, 2 Jun 2015 13:14:46 +0000 (13:14 +0000)
committerVasileios Kalintiris <Vasileios.Kalintiris@imgtec.com>
Tue, 2 Jun 2015 13:14:46 +0000 (13:14 +0000)
commit330e5f16d10736964e1cbec3fdf597b90c0ba6f7
tree2fb2c4b08fd714979dffb532bac61d16cee22dc6
parent9751e35f20e6ec207444ad5cc94cf86b4874e4f3
[mips] Add support for dynamic stack realignment.

Summary:
With this change we are able to realign the stack dynamically, whenever it
contains objects with alignment requirements that are larger than the
alignment specified from the given ABI.

We have to use the $fp register as the frame pointer when we perform
dynamic stack realignment. In complex stack frames, with variably-sized
objects, we reserve additionally the callee-saved register $s7 as the
base pointer in order to reference locals.

Reviewers: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8633

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238829 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
lib/Target/Mips/MipsFrameLowering.cpp
lib/Target/Mips/MipsFrameLowering.h
lib/Target/Mips/MipsRegisterInfo.cpp
lib/Target/Mips/MipsRegisterInfo.h
lib/Target/Mips/MipsSEFrameLowering.cpp
lib/Target/Mips/MipsSERegisterInfo.cpp
test/CodeGen/Mips/dynamic-stack-realignment.ll [new file with mode: 0644]
test/CodeGen/Mips/emergency-spill-slot-near-fp.ll