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,14 +384,15 @@ static DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* fram
/*********************************************************************
* __CxxFrameHandler (MSVCRT.@)
*/
void __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch,
CONTEXT86 *context )
void MSVCRT__CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch,
CONTEXT86 *context )
{
cxx_function_descr *descr = (cxx_function_descr *)context->Eax;
context->Eax = cxx_frame_handler( rec, (cxx_exception_frame *)frame,
exc_context, dispatch, descr, NULL, 0, context );
}
DEFINE_REGS_ENTRYPOINT( __CxxFrameHandler, MSVCRT__CxxFrameHandler, 16, 0 );
#endif /* __i386__ */
......
......@@ -280,6 +280,7 @@ typedef void (*MSVCRT_unwind_function)(const void*);
/*******************************************************************
* _setjmp (MSVCRT.@)
*/
DEFINE_REGS_ENTRYPOINT( MSVCRT__setjmp, _MSVCRT__setjmp, 4, 0 );
void _MSVCRT__setjmp(_JUMP_BUFFER *jmp, CONTEXT86* context)
{
TRACE("(%p)\n",jmp);
......@@ -301,6 +302,7 @@ void _MSVCRT__setjmp(_JUMP_BUFFER *jmp, CONTEXT86* context)
/*******************************************************************
* _setjmp3 (MSVCRT.@)
*/
DEFINE_REGS_ENTRYPOINT( MSVCRT__setjmp3, _MSVCRT__setjmp3, 8, 0 );
void _MSVCRT__setjmp3(_JUMP_BUFFER *jmp, int nb_args, CONTEXT86* context)
{
TRACE("(%p,%d)\n",jmp,nb_args);
......@@ -337,6 +339,7 @@ void _MSVCRT__setjmp3(_JUMP_BUFFER *jmp, int nb_args, CONTEXT86* context)
/*********************************************************************
* longjmp (MSVCRT.@)
*/
DEFINE_REGS_ENTRYPOINT( MSVCRT_longjmp, _MSVCRT_longjmp, 8, 0 );
void _MSVCRT_longjmp(_JUMP_BUFFER *jmp, int retval, CONTEXT86* context)
{
unsigned long cur_frame = 0;
......
......@@ -75,7 +75,7 @@
@ extern _HUGE MSVCRT__HUGE
@ cdecl _Strftime(str long str ptr ptr)
@ cdecl _XcptFilter(long ptr)
@ cdecl -register -i386 __CxxFrameHandler(ptr ptr ptr ptr)
@ cdecl -i386 __CxxFrameHandler(ptr ptr ptr ptr)
@ stub __CxxLongjmpUnwind #(ptr) stdcall
@ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid
@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast
......@@ -426,8 +426,8 @@
@ stdcall _set_error_mode(long)
@ stub _set_sbh_threshold #(long)
@ stub _seterrormode #(long)
@ cdecl -register -i386 _setjmp(ptr) _MSVCRT__setjmp
@ cdecl -register -i386 _setjmp3(ptr long) _MSVCRT__setjmp3
@ cdecl -i386 _setjmp(ptr) MSVCRT__setjmp
@ cdecl -i386 _setjmp3(ptr long) MSVCRT__setjmp3
@ stub _setmaxstdio #(long)
@ cdecl _setmbcp(long)
@ cdecl _setmode(long long)
......@@ -659,7 +659,7 @@
@ cdecl localtime(ptr)
@ cdecl log(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 mblen(ptr long) MSVCRT_mblen
@ cdecl mbstowcs(ptr str long) ntdll.mbstowcs
......
......@@ -94,7 +94,7 @@
@ extern _HUGE msvcrt._HUGE
@ cdecl _Strftime(str long str ptr ptr) msvcrt._Strftime
@ 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
@ cdecl __RTCastToVoid(ptr) msvcrt.__RTCastToVoid
@ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast
......@@ -456,8 +456,8 @@
@ stub _set_error_mode #(long)
@ stub _set_sbh_threshold #(long)
@ stub _seterrormode #(long)
@ cdecl -register -i386 _setjmp(ptr) msvcrt._setjmp
@ cdecl -register -i386 _setjmp3(ptr long) msvcrt._setjmp3
@ cdecl -i386 _setjmp(ptr) msvcrt._setjmp
@ cdecl -i386 _setjmp3(ptr long) msvcrt._setjmp3
@ stub _setmaxstdio #(long)
@ cdecl _setmbcp(long) msvcrt._setmbcp
@ cdecl _setmode(long long) msvcrt._setmode
......@@ -689,7 +689,7 @@
@ cdecl localtime(ptr)
@ cdecl log(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 mblen(ptr long) msvcrt.mblen
@ cdecl mbstowcs(ptr str long) ntdll.mbstowcs
......
......@@ -904,12 +904,12 @@
@ stub __eGetStatusWord
@ stdcall -ret64 _alldiv(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)
@ cdecl -ret64 _atoi64(str)
@ stdcall -ret64 _aulldiv(long long long long)
@ stdcall -ret64 _aullrem(long long long long)
@ stdcall -register -i386 _chkstk() NTDLL_chkstk
@ stdcall -i386 _chkstk()
@ stub _fltused
@ cdecl -ret64 _ftol() NTDLL__ftol
@ cdecl _i64toa(long long ptr long)
......
......@@ -354,20 +354,27 @@ BOOLEAN WINAPI RtlGetNtProductType(LPDWORD type)
*
* Glorified "enter xxxx".
*/
#ifdef __i386__
void WINAPI NTDLL_chkstk( CONTEXT86 *context )
{
context->Esp -= context->Eax;
}
DEFINE_REGS_ENTRYPOINT( _chkstk, NTDLL_chkstk, 0, 0 );
#endif
/**************************************************************************
* _alloca_probe [NTDLL.@]
*
* Glorified "enter xxxx".
*/
#ifdef __i386__
void WINAPI NTDLL_alloca_probe( CONTEXT86 *context )
{
context->Esp -= context->Eax;
}
DEFINE_REGS_ENTRYPOINT( _alloca_probe, NTDLL_alloca_probe, 0, 0 );
#endif
/******************************************************************************
* 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