diff options
| author | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-06-02 13:14:46 +0000 |
|---|---|---|
| committer | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-06-02 13:14:46 +0000 |
| commit | bb698c7d5f23474930fae702ac44ee5ab8e03781 (patch) | |
| tree | 396c2a5e09d20a93b4c77957e1729d864a3094df /llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp | |
| parent | e62307421053f527e2837e7a4d1d3c246b39303f (diff) | |
| download | bcm5719-llvm-bb698c7d5f23474930fae702ac44ee5ab8e03781.tar.gz bcm5719-llvm-bb698c7d5f23474930fae702ac44ee5ab8e03781.zip | |
[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
llvm-svn: 238829
Diffstat (limited to 'llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp index b1f7c2f2259..bf8f7d12880 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp @@ -99,6 +99,10 @@ unsigned MipsABIInfo::GetFramePtr() const { return ArePtrs64bit() ? Mips::FP_64 : Mips::FP; } +unsigned MipsABIInfo::GetBasePtr() const { + return ArePtrs64bit() ? Mips::S7_64 : Mips::S7; +} + unsigned MipsABIInfo::GetNullPtr() const { return ArePtrs64bit() ? Mips::ZERO_64 : Mips::ZERO; } |

