summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-12-20 06:51:45 +0000
committerMartin Storsjo <martin@martin.st>2017-12-20 06:51:45 +0000
commitc8f103e52b297f3e3e0ed1756e11373c68af3566 (patch)
tree6e47aa2290d6530507ce34ce7c87c156e39a2401 /docs
parentac89b1f14197143c7bb95510af1abd3896ce3963 (diff)
[AArch64] Implement stack probing for windows
Differential Revision: https://reviews.llvm.org/D41131 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/Extensions.rst28
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/Extensions.rst b/docs/Extensions.rst
index 14fea30204b..32eeadd78ba 100644
--- a/docs/Extensions.rst
+++ b/docs/Extensions.rst
@@ -288,3 +288,31 @@ standard stack probe emission.
The MSVC environment does not emit code for VLAs currently.
+Windows on ARM64
+----------------
+
+Stack Probe Emission
+^^^^^^^^^^^^^^^^^^^^
+
+The reference implementation (Microsoft Visual Studio 2017) emits stack probes
+in the following fashion:
+
+.. code-block:: gas
+
+ mov x15, #constant
+ bl __chkstk
+ sub sp, sp, x15, lsl #4
+
+However, this has the limitation of 256 MiB (±128MiB). In order to accommodate
+larger binaries, LLVM supports the use of ``-mcode-model=large`` to allow a 8GiB
+(±4GiB) range via a slight deviation. It will generate an indirect jump as
+follows:
+
+.. code-block:: gas
+
+ mov x15, #constant
+ adrp x16, __chkstk
+ add x16, x16, :lo12:__chkstk
+ blr x16
+ sub sp, sp, x15, lsl #4
+