1 // This file is dual licensed under the MIT and the University of Illinois Open
2 // Source Licenses. See LICENSE.TXT for details.
4 #include "../assembly.h"
7 // This routine is windows specific.
8 // http://msdn.microsoft.com/en-us/library/ms648426.aspx
10 // This clobbers the register r12, and the condition codes, and uses r5 and r6
11 // as temporaries by backing them up and restoring them afterwards.
12 // Does not modify any memory or the stack pointer.
14 // movw r4, #256 // Number of bytes of stack, in units of 4 byte
18 #define PAGE_SIZE 4096
21 DEFINE_COMPILERRT_FUNCTION(__chkstk)
27 sub r12, r12, #PAGE_SIZE
28 subs r5, r5, #PAGE_SIZE
34 END_COMPILERRT_FUNCTION(__chkstk)