diff --git a/sdk/lib/crt/CMakeLists.txt b/sdk/lib/crt/CMakeLists.txt index 03a366ce372..24d4205fbd0 100644 --- a/sdk/lib/crt/CMakeLists.txt +++ b/sdk/lib/crt/CMakeLists.txt @@ -9,10 +9,7 @@ if(ARCH STREQUAL "i386") list(APPEND CHKSTK_SOURCE except/i386/chkstk_ms.s) endif() elseif(ARCH STREQUAL "amd64") - list(APPEND CHKSTK_ASM_SOURCE except/amd64/chkstk_asm.s) - if(NOT MSVC) - list(APPEND CHKSTK_SOURCE except/amd64/chkstk_ms.s) - endif() + list(APPEND CHKSTK_ASM_SOURCE except/amd64/chkstk_ms.s) elseif(ARCH STREQUAL "arm") list(APPEND CHKSTK_ASM_SOURCE except/arm/chkstk_asm.s) if(NOT MSVC) diff --git a/sdk/lib/crt/except/amd64/chkstk_ms.s b/sdk/lib/crt/except/amd64/chkstk_ms.s index dbf9eb2e691..0894720975f 100644 --- a/sdk/lib/crt/except/amd64/chkstk_ms.s +++ b/sdk/lib/crt/except/amd64/chkstk_ms.s @@ -15,14 +15,17 @@ /* CODE **********************************************************************/ .code64 -PUBLIC ___chkstk_ms +PUBLIC __chkstk +PUBLIC __alloca_probe + +__alloca_probe: +.PROC __chkstk - //cfi_startproc() -___chkstk_ms: push rcx /* save temps */ - //cfi_push(%rcx) + .pushreg rcx push rax - //cfi_push(%rax) + .pushreg rax + .endprolog cmp rax, PAGE_SIZE /* > 4k ?*/ lea rcx, [rsp + 24] /* point past return addr */ @@ -41,11 +44,10 @@ l_LessThanAPage: or byte ptr [rcx], 0 /* less than 4k, just peek here */ pop rax - //cfi_pop(%rax) pop rcx - //cfi_pop(%rcx) ret - //cfi_endproc() + +.ENDP END /* EOF */ diff --git a/sdk/lib/crt/libcntpr.cmake b/sdk/lib/crt/libcntpr.cmake index 1a49be53d75..f15f60367b1 100644 --- a/sdk/lib/crt/libcntpr.cmake +++ b/sdk/lib/crt/libcntpr.cmake @@ -112,7 +112,7 @@ if(ARCH STREQUAL "i386") endif() elseif(ARCH STREQUAL "amd64") list(APPEND LIBCNTPR_ASM_SOURCE - except/amd64/chkstk_asm.s + except/amd64/chkstk_ms.s except/amd64/seh.s setjmp/amd64/setjmp.s math/amd64/atan.S diff --git a/sdk/lib/crt/msvcrtex.cmake b/sdk/lib/crt/msvcrtex.cmake index 3d68ce5189f..66b90d47ed8 100644 --- a/sdk/lib/crt/msvcrtex.cmake +++ b/sdk/lib/crt/msvcrtex.cmake @@ -67,7 +67,6 @@ if(ARCH STREQUAL "i386") math/i386/cisqrt.c) elseif(ARCH STREQUAL "amd64") list(APPEND MSVCRTEX_ASM_SOURCE - except/amd64/chkstk_asm.s except/amd64/chkstk_ms.s) elseif(ARCH STREQUAL "arm") list(APPEND MSVCRTEX_SOURCE