ARM: support stack probe emission for Windows on ARM
authorSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 30 Apr 2014 07:05:07 +0000 (07:05 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 30 Apr 2014 07:05:07 +0000 (07:05 +0000)
commitddbde80aae45be5c461efd4fa850536d185c95b8
tree25e1ce9b6bd6b3a5d2c11f9daa2cb11df6ad6037
parent38dbc8460217c5a5e89b09d901a0a006c9c99385
ARM: support stack probe emission for Windows on ARM

This introduces the stack lowering emission of the stack probe function for
Windows on ARM. The stack on Windows on ARM is a dynamically paged stack where
any page allocation which crosses a page boundary of the following guard page
will cause a page fault. This page fault must be handled by the kernel to
ensure that the page is faulted in. If this does not occur and a write access
any memory beyond that, the page fault will go unserviced, resulting in an
abnormal program termination.

The watermark for the stack probe appears to be at 4080 bytes (for
accommodating the stack guard canaries and stack alignment) when SSP is
enabled.  Otherwise, the stack probe is emitted on the page size boundary of
4096 bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207615 91177308-0d34-0410-b5e6-96231b3b80d8
docs/Extensions.rst
lib/Target/ARM/ARMFrameLowering.cpp
test/CodeGen/ARM/Windows/chkstk.ll [new file with mode: 0644]