mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 00:54:18 +00:00
[CRT] Use chkstk_ms.s on x64 builds
This commit is contained in:
parent
38be76187a
commit
aff33c855d
4 changed files with 12 additions and 14 deletions
|
@ -9,10 +9,7 @@ if(ARCH STREQUAL "i386")
|
||||||
list(APPEND CHKSTK_SOURCE except/i386/chkstk_ms.s)
|
list(APPEND CHKSTK_SOURCE except/i386/chkstk_ms.s)
|
||||||
endif()
|
endif()
|
||||||
elseif(ARCH STREQUAL "amd64")
|
elseif(ARCH STREQUAL "amd64")
|
||||||
list(APPEND CHKSTK_ASM_SOURCE except/amd64/chkstk_asm.s)
|
list(APPEND CHKSTK_ASM_SOURCE except/amd64/chkstk_ms.s)
|
||||||
if(NOT MSVC)
|
|
||||||
list(APPEND CHKSTK_SOURCE except/amd64/chkstk_ms.s)
|
|
||||||
endif()
|
|
||||||
elseif(ARCH STREQUAL "arm")
|
elseif(ARCH STREQUAL "arm")
|
||||||
list(APPEND CHKSTK_ASM_SOURCE except/arm/chkstk_asm.s)
|
list(APPEND CHKSTK_ASM_SOURCE except/arm/chkstk_asm.s)
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
|
|
|
@ -15,14 +15,17 @@
|
||||||
/* CODE **********************************************************************/
|
/* CODE **********************************************************************/
|
||||||
.code64
|
.code64
|
||||||
|
|
||||||
PUBLIC ___chkstk_ms
|
PUBLIC __chkstk
|
||||||
|
PUBLIC __alloca_probe
|
||||||
|
|
||||||
|
__alloca_probe:
|
||||||
|
.PROC __chkstk
|
||||||
|
|
||||||
//cfi_startproc()
|
|
||||||
___chkstk_ms:
|
|
||||||
push rcx /* save temps */
|
push rcx /* save temps */
|
||||||
//cfi_push(%rcx)
|
.pushreg rcx
|
||||||
push rax
|
push rax
|
||||||
//cfi_push(%rax)
|
.pushreg rax
|
||||||
|
.endprolog
|
||||||
|
|
||||||
cmp rax, PAGE_SIZE /* > 4k ?*/
|
cmp rax, PAGE_SIZE /* > 4k ?*/
|
||||||
lea rcx, [rsp + 24] /* point past return addr */
|
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 */
|
or byte ptr [rcx], 0 /* less than 4k, just peek here */
|
||||||
|
|
||||||
pop rax
|
pop rax
|
||||||
//cfi_pop(%rax)
|
|
||||||
pop rcx
|
pop rcx
|
||||||
//cfi_pop(%rcx)
|
|
||||||
ret
|
ret
|
||||||
//cfi_endproc()
|
|
||||||
|
.ENDP
|
||||||
|
|
||||||
END
|
END
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -112,7 +112,7 @@ if(ARCH STREQUAL "i386")
|
||||||
endif()
|
endif()
|
||||||
elseif(ARCH STREQUAL "amd64")
|
elseif(ARCH STREQUAL "amd64")
|
||||||
list(APPEND LIBCNTPR_ASM_SOURCE
|
list(APPEND LIBCNTPR_ASM_SOURCE
|
||||||
except/amd64/chkstk_asm.s
|
except/amd64/chkstk_ms.s
|
||||||
except/amd64/seh.s
|
except/amd64/seh.s
|
||||||
setjmp/amd64/setjmp.s
|
setjmp/amd64/setjmp.s
|
||||||
math/amd64/atan.S
|
math/amd64/atan.S
|
||||||
|
|
|
@ -67,7 +67,6 @@ if(ARCH STREQUAL "i386")
|
||||||
math/i386/cisqrt.c)
|
math/i386/cisqrt.c)
|
||||||
elseif(ARCH STREQUAL "amd64")
|
elseif(ARCH STREQUAL "amd64")
|
||||||
list(APPEND MSVCRTEX_ASM_SOURCE
|
list(APPEND MSVCRTEX_ASM_SOURCE
|
||||||
except/amd64/chkstk_asm.s
|
|
||||||
except/amd64/chkstk_ms.s)
|
except/amd64/chkstk_ms.s)
|
||||||
elseif(ARCH STREQUAL "arm")
|
elseif(ARCH STREQUAL "arm")
|
||||||
list(APPEND MSVCRTEX_SOURCE
|
list(APPEND MSVCRTEX_SOURCE
|
||||||
|
|
Loading…
Reference in a new issue