diff options
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.masm | 29 |
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 @@ | |||
| 1 | include ksamd64.inc | ||
| 2 | |||
| 3 | text SEGMENT EXECUTE | ||
| 4 | |||
| 5 | public __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 | ||
| 19 | chkstk_loop: | ||
| 20 | lea r11,[r11-PAGE_SIZE] | ||
| 21 | mov BYTE PTR [r11],0h | ||
| 22 | cmp r10,r11 | ||
| 23 | jne chkstk_loop | ||
| 24 | chkstk_finish: | ||
| 25 | mov r10,QWORD PTR [rsp] | ||
| 26 | mov r11,QWORD PTR [rsp+08h] | ||
| 27 | add rsp,010h | ||
| 28 | ret | ||
| 29 | end | ||
