summaryrefslogtreecommitdiff
path: root/contrib/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm')
-rw-r--r--contrib/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm29
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm b/contrib/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm
new file mode 100644
index 0000000..1590d88
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm
@@ -0,0 +1,29 @@
1include ksamd64.inc
2
3text SEGMENT EXECUTE
4
5public __chkstk
6
7__chkstk:
8 sub rsp,010h
9 mov QWORD PTR [rsp],r10
10 mov QWORD PTR [rsp+08h],r11
11 xor r11,r11
12 lea r10,[rsp+018h]
13 sub r10,rax
14 cmovb r10,r11
15 mov r11,QWORD PTR gs:[TeStackLimit]
16 cmp r10,r11
17 jae chkstk_finish
18 and r10w,0f000h
19chkstk_loop:
20 lea r11,[r11-PAGE_SIZE]
21 mov BYTE PTR [r11],0h
22 cmp r10,r11
23 jne chkstk_loop
24chkstk_finish:
25 mov r10,QWORD PTR [rsp]
26 mov r11,QWORD PTR [rsp+08h]
27 add rsp,010h
28 ret
29end