diff options
author | 2019-01-29 22:35:43 +0000 | |
---|---|---|
committer | 2019-01-29 22:35:43 +0000 | |
commit | 64bb0428c690670660f6397e66ca194e512556ae (patch) | |
tree | 9897a6785a6c40cf0bb4f0b680a49cb4ea433f49 /lib/libcompiler_rt/arm | |
parent | replace some archaic quotes with plain variations. (diff) | |
download | wireguard-openbsd-64bb0428c690670660f6397e66ca194e512556ae.tar.xz wireguard-openbsd-64bb0428c690670660f6397e66ca194e512556ae.zip |
Update compiler-rt to 7.0.1. This is mostly a cosmetic update since
most changes are guarded behind WIN32 or GCC ifdefs. The functional
change is in emutls and AMD model checking.
ok kettenis@
Diffstat (limited to 'lib/libcompiler_rt/arm')
-rw-r--r-- | lib/libcompiler_rt/arm/chkstk.S | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/libcompiler_rt/arm/chkstk.S b/lib/libcompiler_rt/arm/chkstk.S new file mode 100644 index 00000000000..e3002105897 --- /dev/null +++ b/lib/libcompiler_rt/arm/chkstk.S @@ -0,0 +1,34 @@ +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. + +#include "../assembly.h" + +// __chkstk routine +// This routine is windows specific. +// http://msdn.microsoft.com/en-us/library/ms648426.aspx + +// This clobbers the register r12, and the condition codes, and uses r5 and r6 +// as temporaries by backing them up and restoring them afterwards. +// Does not modify any memory or the stack pointer. + +// movw r4, #256 // Number of bytes of stack, in units of 4 byte +// bl __chkstk +// sub.w sp, sp, r4 + +#define PAGE_SIZE 4096 + + .p2align 2 +DEFINE_COMPILERRT_FUNCTION(__chkstk) + lsl r4, r4, #2 + mov r12, sp + push {r5, r6} + mov r5, r4 +1: + sub r12, r12, #PAGE_SIZE + subs r5, r5, #PAGE_SIZE + ldr r6, [r12] + bgt 1b + + pop {r5, r6} + bx lr +END_COMPILERRT_FUNCTION(__chkstk) |