summaryrefslogtreecommitdiff
path: root/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-02-18 20:55:12 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-02-18 20:55:12 +0000
commit98fbe27ac8f0766ea94b89b8c03418131b72bea4 (patch)
treed1f8b9f2500eabd57718aa531401a34c7fc36ac3 /lib/CodeGen/PrologEpilogInserter.cpp
parentb875acda987650d1d734b8bc6e76283950529f84 (diff)
downloadllvm-98fbe27ac8f0766ea94b89b8c03418131b72bea4.tar.gz
llvm-98fbe27ac8f0766ea94b89b8c03418131b72bea4.tar.bz2
llvm-98fbe27ac8f0766ea94b89b8c03418131b72bea4.tar.xz
Support for HiPE-compatible code emission, patch by Yiannis Tsiouris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175457 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--lib/CodeGen/PrologEpilogInserter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp
index 954613d6f9..45e04a9c62 100644
--- a/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/lib/CodeGen/PrologEpilogInserter.cpp
@@ -693,6 +693,14 @@ void PEI::insertPrologEpilogCode(MachineFunction &Fn) {
// space in small chunks instead of one large contiguous block.
if (Fn.getTarget().Options.EnableSegmentedStacks)
TFI.adjustForSegmentedStacks(Fn);
+
+ // Emit additional code that is required to explicitly handle the stack in
+ // HiPE native code (if needed) when loaded in the Erlang/OTP runtime. The
+ // approach is rather similar to that of Segmented Stacks, but it uses a
+ // different conditional check and another BIF for allocating more stack
+ // space.
+ if (Fn.getFunction()->getCallingConv() == CallingConv::HiPE)
+ TFI.adjustForHiPEPrologue(Fn);
}
/// replaceFrameIndices - Replace all MO_FrameIndex operands with physical