From 5a079a2d114f96d4847d1ee305d5b7c16eeec50e Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 27 Dec 2025 12:03:39 -0800 Subject: Initial commit --- contrib/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 contrib/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm (limited to 'contrib/SDL-3.2.8/src/stdlib/SDL_mslibc_x64.masm') 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 @@ +include ksamd64.inc + +text SEGMENT EXECUTE + +public __chkstk + +__chkstk: + sub rsp,010h + mov QWORD PTR [rsp],r10 + mov QWORD PTR [rsp+08h],r11 + xor r11,r11 + lea r10,[rsp+018h] + sub r10,rax + cmovb r10,r11 + mov r11,QWORD PTR gs:[TeStackLimit] + cmp r10,r11 + jae chkstk_finish + and r10w,0f000h +chkstk_loop: + lea r11,[r11-PAGE_SIZE] + mov BYTE PTR [r11],0h + cmp r10,r11 + jne chkstk_loop +chkstk_finish: + mov r10,QWORD PTR [rsp] + mov r11,QWORD PTR [rsp+08h] + add rsp,010h + ret +end -- cgit v1.2.3