summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2010-03-06 20:07:32 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2010-03-06 20:07:32 +0000
commite765f2b5e3f260c96579859f503a4e5e76cb4c1c (patch)
treefc9f979f124ad520ad55952479bf6d4713c67f33
parentce7bf1c55f5238870bae2909cd368151f1d813d1 (diff)
downloadllvm-e765f2b5e3f260c96579859f503a4e5e76cb4c1c.tar.gz
Describe what's going on with mingw alloca and why do we need separate instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97888 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86InstrInfo.td10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td
index 9953b052cf67..8a6ff54c771e 100644
--- a/lib/Target/X86/X86InstrInfo.td
+++ b/lib/Target/X86/X86InstrInfo.td
@@ -533,8 +533,16 @@ def VASTART_SAVE_XMM_REGS : I<0, Pseudo,
imm:$regsavefi,
imm:$offset)]>;
+// Dynamic stack allocation yields _alloca call for Cygwin/Mingw targets. Calls
+// to _alloca is needed to probe the stack when allocating more than 4k bytes in
+// one go. Touching the stack at 4K increments is necessary to ensure that the
+// guard pages used by the OS virtual memory manager are allocated in correct
+// sequence.
+// The main point of having separate instruction are extra unmodelled effects
+// (compared to ordinary calls) like stack pointer change.
+
def MINGW_ALLOCA : I<0, Pseudo, (outs), (ins),
- "call __alloca",
+ "# dynamic stack allocation",
[(X86MingwAlloca)]>;
}