Commit f752be84 authored by Alexandre Julliard's avatar Alexandre Julliard

Implement some more register functions using DEFINE_REGS_ENTRYPOINT to

make them available for imports.
parent e8549127
...@@ -384,7 +384,7 @@ static DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* fram ...@@ -384,7 +384,7 @@ static DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* fram
/********************************************************************* /*********************************************************************
* __CxxFrameHandler (MSVCRT.@) * __CxxFrameHandler (MSVCRT.@)
*/ */
void __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame, void MSVCRT__CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch, PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch,
CONTEXT86 *context ) CONTEXT86 *context )
{ {
...@@ -392,6 +392,7 @@ void __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* fr ...@@ -392,6 +392,7 @@ void __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* fr
context->Eax = cxx_frame_handler( rec, (cxx_exception_frame *)frame, context->Eax = cxx_frame_handler( rec, (cxx_exception_frame *)frame,
exc_context, dispatch, descr, NULL, 0, context ); exc_context, dispatch, descr, NULL, 0, context );
} }
DEFINE_REGS_ENTRYPOINT( __CxxFrameHandler, MSVCRT__CxxFrameHandler, 16, 0 );
#endif /* __i386__ */ #endif /* __i386__ */
......
...@@ -280,6 +280,7 @@ typedef void (*MSVCRT_unwind_function)(const void*); ...@@ -280,6 +280,7 @@ typedef void (*MSVCRT_unwind_function)(const void*);
/******************************************************************* /*******************************************************************
* _setjmp (MSVCRT.@) * _setjmp (MSVCRT.@)
*/ */
DEFINE_REGS_ENTRYPOINT( MSVCRT__setjmp, _MSVCRT__setjmp, 4, 0 );
void _MSVCRT__setjmp(_JUMP_BUFFER *jmp, CONTEXT86* context) void _MSVCRT__setjmp(_JUMP_BUFFER *jmp, CONTEXT86* context)
{ {
TRACE("(%p)\n",jmp); TRACE("(%p)\n",jmp);
...@@ -301,6 +302,7 @@ void _MSVCRT__setjmp(_JUMP_BUFFER *jmp, CONTEXT86* context) ...@@ -301,6 +302,7 @@ void _MSVCRT__setjmp(_JUMP_BUFFER *jmp, CONTEXT86* context)
/******************************************************************* /*******************************************************************
* _setjmp3 (MSVCRT.@) * _setjmp3 (MSVCRT.@)
*/ */
DEFINE_REGS_ENTRYPOINT( MSVCRT__setjmp3, _MSVCRT__setjmp3, 8, 0 );
void _MSVCRT__setjmp3(_JUMP_BUFFER *jmp, int nb_args, CONTEXT86* context) void _MSVCRT__setjmp3(_JUMP_BUFFER *jmp, int nb_args, CONTEXT86* context)
{ {
TRACE("(%p,%d)\n",jmp,nb_args); TRACE("(%p,%d)\n",jmp,nb_args);
...@@ -337,6 +339,7 @@ void _MSVCRT__setjmp3(_JUMP_BUFFER *jmp, int nb_args, CONTEXT86* context) ...@@ -337,6 +339,7 @@ void _MSVCRT__setjmp3(_JUMP_BUFFER *jmp, int nb_args, CONTEXT86* context)
/********************************************************************* /*********************************************************************
* longjmp (MSVCRT.@) * longjmp (MSVCRT.@)
*/ */
DEFINE_REGS_ENTRYPOINT( MSVCRT_longjmp, _MSVCRT_longjmp, 8, 0 );
void _MSVCRT_longjmp(_JUMP_BUFFER *jmp, int retval, CONTEXT86* context) void _MSVCRT_longjmp(_JUMP_BUFFER *jmp, int retval, CONTEXT86* context)
{ {
unsigned long cur_frame = 0; unsigned long cur_frame = 0;
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
@ extern _HUGE MSVCRT__HUGE @ extern _HUGE MSVCRT__HUGE
@ cdecl _Strftime(str long str ptr ptr) @ cdecl _Strftime(str long str ptr ptr)
@ cdecl _XcptFilter(long ptr) @ cdecl _XcptFilter(long ptr)
@ cdecl -register -i386 __CxxFrameHandler(ptr ptr ptr ptr) @ cdecl -i386 __CxxFrameHandler(ptr ptr ptr ptr)
@ stub __CxxLongjmpUnwind #(ptr) stdcall @ stub __CxxLongjmpUnwind #(ptr) stdcall
@ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid
@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast
...@@ -426,8 +426,8 @@ ...@@ -426,8 +426,8 @@
@ stdcall _set_error_mode(long) @ stdcall _set_error_mode(long)
@ stub _set_sbh_threshold #(long) @ stub _set_sbh_threshold #(long)
@ stub _seterrormode #(long) @ stub _seterrormode #(long)
@ cdecl -register -i386 _setjmp(ptr) _MSVCRT__setjmp @ cdecl -i386 _setjmp(ptr) MSVCRT__setjmp
@ cdecl -register -i386 _setjmp3(ptr long) _MSVCRT__setjmp3 @ cdecl -i386 _setjmp3(ptr long) MSVCRT__setjmp3
@ stub _setmaxstdio #(long) @ stub _setmaxstdio #(long)
@ cdecl _setmbcp(long) @ cdecl _setmbcp(long)
@ cdecl _setmode(long long) @ cdecl _setmode(long long)
...@@ -659,7 +659,7 @@ ...@@ -659,7 +659,7 @@
@ cdecl localtime(ptr) @ cdecl localtime(ptr)
@ cdecl log(double) @ cdecl log(double)
@ cdecl log10(double) @ cdecl log10(double)
@ cdecl -register -i386 longjmp(ptr long) _MSVCRT_longjmp @ cdecl -i386 longjmp(ptr long) MSVCRT_longjmp
@ cdecl malloc(long) MSVCRT_malloc @ cdecl malloc(long) MSVCRT_malloc
@ cdecl mblen(ptr long) MSVCRT_mblen @ cdecl mblen(ptr long) MSVCRT_mblen
@ cdecl mbstowcs(ptr str long) ntdll.mbstowcs @ cdecl mbstowcs(ptr str long) ntdll.mbstowcs
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
@ extern _HUGE msvcrt._HUGE @ extern _HUGE msvcrt._HUGE
@ cdecl _Strftime(str long str ptr ptr) msvcrt._Strftime @ cdecl _Strftime(str long str ptr ptr) msvcrt._Strftime
@ cdecl _XcptFilter(long ptr) msvcrt._XcptFilter @ cdecl _XcptFilter(long ptr) msvcrt._XcptFilter
@ cdecl -register -i386 __CxxFrameHandler(ptr ptr ptr ptr) msvcrt.__CxxFrameHandler @ cdecl -i386 __CxxFrameHandler(ptr ptr ptr ptr) msvcrt.__CxxFrameHandler
@ stub __CxxLongjmpUnwind #(ptr) stdcall @ stub __CxxLongjmpUnwind #(ptr) stdcall
@ cdecl __RTCastToVoid(ptr) msvcrt.__RTCastToVoid @ cdecl __RTCastToVoid(ptr) msvcrt.__RTCastToVoid
@ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast @ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast
...@@ -456,8 +456,8 @@ ...@@ -456,8 +456,8 @@
@ stub _set_error_mode #(long) @ stub _set_error_mode #(long)
@ stub _set_sbh_threshold #(long) @ stub _set_sbh_threshold #(long)
@ stub _seterrormode #(long) @ stub _seterrormode #(long)
@ cdecl -register -i386 _setjmp(ptr) msvcrt._setjmp @ cdecl -i386 _setjmp(ptr) msvcrt._setjmp
@ cdecl -register -i386 _setjmp3(ptr long) msvcrt._setjmp3 @ cdecl -i386 _setjmp3(ptr long) msvcrt._setjmp3
@ stub _setmaxstdio #(long) @ stub _setmaxstdio #(long)
@ cdecl _setmbcp(long) msvcrt._setmbcp @ cdecl _setmbcp(long) msvcrt._setmbcp
@ cdecl _setmode(long long) msvcrt._setmode @ cdecl _setmode(long long) msvcrt._setmode
...@@ -689,7 +689,7 @@ ...@@ -689,7 +689,7 @@
@ cdecl localtime(ptr) @ cdecl localtime(ptr)
@ cdecl log(double) @ cdecl log(double)
@ cdecl log10(double) @ cdecl log10(double)
@ cdecl -register -i386 longjmp(ptr long) msvcrt.longjmp @ cdecl -i386 longjmp(ptr long) msvcrt.longjmp
@ cdecl malloc(long) msvcrt.malloc @ cdecl malloc(long) msvcrt.malloc
@ cdecl mblen(ptr long) msvcrt.mblen @ cdecl mblen(ptr long) msvcrt.mblen
@ cdecl mbstowcs(ptr str long) ntdll.mbstowcs @ cdecl mbstowcs(ptr str long) ntdll.mbstowcs
......
...@@ -904,12 +904,12 @@ ...@@ -904,12 +904,12 @@
@ stub __eGetStatusWord @ stub __eGetStatusWord
@ stdcall -ret64 _alldiv(long long long long) @ stdcall -ret64 _alldiv(long long long long)
@ stdcall -ret64 _allmul(long long long long) @ stdcall -ret64 _allmul(long long long long)
@ stdcall -register -i386 _alloca_probe() NTDLL_alloca_probe @ stdcall -i386 _alloca_probe()
@ stdcall -ret64 _allrem(long long long long) @ stdcall -ret64 _allrem(long long long long)
@ cdecl -ret64 _atoi64(str) @ cdecl -ret64 _atoi64(str)
@ stdcall -ret64 _aulldiv(long long long long) @ stdcall -ret64 _aulldiv(long long long long)
@ stdcall -ret64 _aullrem(long long long long) @ stdcall -ret64 _aullrem(long long long long)
@ stdcall -register -i386 _chkstk() NTDLL_chkstk @ stdcall -i386 _chkstk()
@ stub _fltused @ stub _fltused
@ cdecl -ret64 _ftol() NTDLL__ftol @ cdecl -ret64 _ftol() NTDLL__ftol
@ cdecl _i64toa(long long ptr long) @ cdecl _i64toa(long long ptr long)
......
...@@ -354,20 +354,27 @@ BOOLEAN WINAPI RtlGetNtProductType(LPDWORD type) ...@@ -354,20 +354,27 @@ BOOLEAN WINAPI RtlGetNtProductType(LPDWORD type)
* *
* Glorified "enter xxxx". * Glorified "enter xxxx".
*/ */
#ifdef __i386__
void WINAPI NTDLL_chkstk( CONTEXT86 *context ) void WINAPI NTDLL_chkstk( CONTEXT86 *context )
{ {
context->Esp -= context->Eax; context->Esp -= context->Eax;
} }
DEFINE_REGS_ENTRYPOINT( _chkstk, NTDLL_chkstk, 0, 0 );
#endif
/************************************************************************** /**************************************************************************
* _alloca_probe [NTDLL.@] * _alloca_probe [NTDLL.@]
* *
* Glorified "enter xxxx". * Glorified "enter xxxx".
*/ */
#ifdef __i386__
void WINAPI NTDLL_alloca_probe( CONTEXT86 *context ) void WINAPI NTDLL_alloca_probe( CONTEXT86 *context )
{ {
context->Esp -= context->Eax; context->Esp -= context->Eax;
} }
DEFINE_REGS_ENTRYPOINT( _alloca_probe, NTDLL_alloca_probe, 0, 0 );
#endif
/****************************************************************************** /******************************************************************************
* RtlInitializeGenericTable [NTDLL.@] * RtlInitializeGenericTable [NTDLL.@]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment