summaryrefslogtreecommitdiff
path: root/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2026-03-06 13:26:57 -0800
committer3gg <3gg@shellblade.net>2026-03-06 13:26:57 -0800
commitf5c89b3bd5d74849757fd5b4d1a300068522a3ca (patch)
treed6f6e4c81745b393d7594b334710f30c0b2df3bd /SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm
Initial commitHEADmain
Diffstat (limited to 'SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm')
-rw-r--r--SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm29
1 files changed, 29 insertions, 0 deletions
diff --git a/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm b/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm
new file mode 100644
index 0000000..1590d88
--- /dev/null
+++ b/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