mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[CRT]
- comment out gcc specific code on MSVC builds - add some files for amd64 to msvcrtex svn path=/trunk/; revision=52478
This commit is contained in:
parent
e304414af7
commit
157023269f
5 changed files with 13 additions and 7 deletions
|
@ -13,7 +13,8 @@
|
||||||
/* CODE **********************************************************************/
|
/* CODE **********************************************************************/
|
||||||
.code64
|
.code64
|
||||||
|
|
||||||
EXTERN MsgUnimplemented:BYTE
|
MsgUnimplemented:
|
||||||
|
.ascii "Unimplemented", CR, LF, NUL
|
||||||
|
|
||||||
FUNC __chkstk
|
FUNC __chkstk
|
||||||
.endprolog
|
.endprolog
|
||||||
|
|
|
@ -28,17 +28,17 @@ ___chkstk_ms:
|
||||||
lea rcx, [rsp + 24] /* point past return addr */
|
lea rcx, [rsp + 24] /* point past return addr */
|
||||||
jb l_LessThanAPage
|
jb l_LessThanAPage
|
||||||
|
|
||||||
.l_MoreThanAPage:
|
l_MoreThanAPage:
|
||||||
sub rcx, PAGE_SIZE /* yes, move pointer down 4k */
|
sub rcx, PAGE_SIZE /* yes, move pointer down 4k */
|
||||||
or [rcx], 0 /* probe there */
|
or byte ptr [rcx], 0 /* probe there */
|
||||||
sub rax, PAGE_SIZE /* decrement count */
|
sub rax, PAGE_SIZE /* decrement count */
|
||||||
|
|
||||||
cmp rax, PAGE_SIZE
|
cmp rax, PAGE_SIZE
|
||||||
ja l_MoreThanAPage /* and do it again */
|
ja l_MoreThanAPage /* and do it again */
|
||||||
|
|
||||||
.l_LessThanAPage:
|
l_LessThanAPage:
|
||||||
sub rcx, rax
|
sub rcx, rax
|
||||||
or [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)
|
//cfi_pop(%rax)
|
||||||
|
|
|
@ -49,6 +49,11 @@ list(APPEND MSVCRTEX_SOURCE
|
||||||
math/i386/ftol2_asm.s
|
math/i386/ftol2_asm.s
|
||||||
math/i386/alldiv_asm.s
|
math/i386/alldiv_asm.s
|
||||||
)
|
)
|
||||||
|
elseif(ARCH MATCHES amd64)
|
||||||
|
list(APPEND MSVCRTEX_SOURCE
|
||||||
|
except/amd64/chkstk_asm.s
|
||||||
|
except/amd64/chkstk_ms.s
|
||||||
|
math/amd64/alldiv.S)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
|
|
@ -40,7 +40,7 @@ PBYTE _GetPEImageBase (void);
|
||||||
int __mingw_init_ehandler (void);
|
int __mingw_init_ehandler (void);
|
||||||
extern void _fpreset (void);
|
extern void _fpreset (void);
|
||||||
|
|
||||||
#ifdef _WIN64
|
#if defined(_WIN64) && !defined(_MSC_VER)
|
||||||
EXCEPTION_DISPOSITION __mingw_SEH_error_handler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *);
|
EXCEPTION_DISPOSITION __mingw_SEH_error_handler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *);
|
||||||
|
|
||||||
#define MAX_PDATA_ENTRIES 32
|
#define MAX_PDATA_ENTRIES 32
|
||||||
|
|
|
@ -277,7 +277,7 @@ __tmainCRTStartup (void)
|
||||||
_pei386_runtime_relocator ();
|
_pei386_runtime_relocator ();
|
||||||
#endif
|
#endif
|
||||||
__mingw_oldexcpt_handler = SetUnhandledExceptionFilter (_gnu_exception_handler);
|
__mingw_oldexcpt_handler = SetUnhandledExceptionFilter (_gnu_exception_handler);
|
||||||
#ifdef _WIN64
|
#if defined(_WIN64) && !defined(_MSC_VER)
|
||||||
__mingw_init_ehandler ();
|
__mingw_init_ehandler ();
|
||||||
#endif
|
#endif
|
||||||
__mingw_prepare_except_for_msvcr80_and_higher ();
|
__mingw_prepare_except_for_msvcr80_and_higher ();
|
||||||
|
|
Loading…
Reference in a new issue