winebuild: Don't change %fs and %gs when calling 16-bit register functions.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Alexandre Julliard 2019-05-17 16:43:06 +02:00
parent 92919001f3
commit 075e561f5c
6 changed files with 0 additions and 22 deletions

View File

@ -222,8 +222,6 @@ static LRESULT call_hook16( WNDPROC16 hook, HWND hwnd, UINT msg, WPARAM wp, LPAR
memset( &context, 0, sizeof(context) );
context.SegDs = context.SegEs = SELECTOROF( NtCurrentTeb()->WOW32Reserved );
context.SegFs = wine_get_fs();
context.SegGs = wine_get_gs();
context.SegCs = SELECTOROF( hook );
context.Eip = OFFSETOF( hook );
context.Ebp = OFFSETOF( NtCurrentTeb()->WOW32Reserved ) + FIELD_OFFSET( STACK16FRAME, bp );

View File

@ -1234,8 +1234,6 @@ DWORD NE_StartTask(void)
context.SegCs = GlobalHandleToSel16(pSegTable[SELECTOROF(pModule->ne_csip) - 1].hSeg);
context.SegDs = GlobalHandleToSel16(pTask->hInstance);
context.SegEs = pTask->hPDB;
context.SegFs = wine_get_fs();
context.SegGs = wine_get_gs();
context.Eip = OFFSETOF(pModule->ne_csip);
context.Ebx = pModule->ne_stack;
context.Ecx = pModule->ne_heap;

View File

@ -689,8 +689,6 @@ static BOOL NE_InitDLL( NE_MODULE *pModule )
context.Edi = hInst;
context.SegDs = ds;
context.SegEs = ds; /* who knows ... */
context.SegFs = wine_get_fs();
context.SegGs = wine_get_gs();
context.SegCs = SEL(pSegTable[SELECTOROF(pModule->ne_csip)-1].hSeg);
context.Eip = OFFSETOF(pModule->ne_csip);
context.Ebp = OFFSETOF(NtCurrentTeb()->WOW32Reserved) + FIELD_OFFSET(STACK16FRAME,bp);
@ -794,8 +792,6 @@ static void NE_CallDllEntryPoint( NE_MODULE *pModule, DWORD dwReason )
memset( &context, 0, sizeof(context) );
context.SegDs = ds;
context.SegEs = ds; /* who knows ... */
context.SegFs = wine_get_fs();
context.SegGs = wine_get_gs();
context.SegCs = HIWORD(entryPoint);
context.Eip = LOWORD(entryPoint);
context.Ebp = OFFSETOF(NtCurrentTeb()->WOW32Reserved) + FIELD_OFFSET(STACK16FRAME,bp);

View File

@ -431,8 +431,6 @@ void WINAPI __regs_QT_Thunk( CONTEXT *context )
context16 = *context;
context16.SegFs = wine_get_fs();
context16.SegGs = wine_get_gs();
context16.SegCs = HIWORD(context->Edx);
context16.Eip = LOWORD(context->Edx);
/* point EBP to the STACK16FRAME on the stack
@ -561,8 +559,6 @@ void WINAPI __regs_FT_Thunk( CONTEXT *context )
context16 = *context;
context16.SegFs = wine_get_fs();
context16.SegGs = wine_get_gs();
context16.SegCs = HIWORD(callTarget);
context16.Eip = LOWORD(callTarget);
context16.Ebp = OFFSETOF(NtCurrentTeb()->WOW32Reserved) + FIELD_OFFSET(STACK16FRAME,bp);
@ -720,8 +716,6 @@ void WINAPI __regs_Common32ThkLS( CONTEXT *context )
context16 = *context;
context16.SegFs = wine_get_fs();
context16.SegGs = wine_get_gs();
context16.Edi = LOWORD(context->Ecx);
context16.SegCs = HIWORD(context->Eax);
context16.Eip = LOWORD(context->Eax);
@ -779,8 +773,6 @@ void WINAPI __regs_OT_32ThkLSF( CONTEXT *context )
context16 = *context;
context16.SegFs = wine_get_fs();
context16.SegGs = wine_get_gs();
context16.SegCs = HIWORD(context->Edx);
context16.Eip = LOWORD(context->Edx);
context16.Ebp = OFFSETOF(NtCurrentTeb()->WOW32Reserved) + FIELD_OFFSET(STACK16FRAME,bp);

View File

@ -68,8 +68,6 @@ static void CALLBACK SYSTEM_TimerTick( LPVOID arg, DWORD low, DWORD high )
SYS_Timers[i].ticks += SYS_Timers[i].rate;
memset( &context, 0, sizeof(context) );
context.SegFs = wine_get_fs();
context.SegGs = wine_get_gs();
context.SegCs = SELECTOROF( proc );
context.Eip = OFFSETOF( proc );
context.Ebp = OFFSETOF(NtCurrentTeb()->WOW32Reserved) + FIELD_OFFSET(STACK16FRAME, bp);

View File

@ -492,10 +492,6 @@ static void BuildCallTo16Core( int reg_func )
output( "\tpushw 0x98(%%edx)\n"); /* SegDs */
output( "\tpushl 0x94(%%edx)\n"); /* SegEs */
output( "\tpopl %%es\n" );
output( "\tpushl 0x90(%%edx)\n"); /* SegFs */
output( "\tpopl %%fs\n" );
output( "\tpushl 0x8c(%%edx)\n"); /* SegGs */
output( "\tpopl %%gs\n" );
output( "\tmovl 0xb4(%%edx),%%ebp\n"); /* Ebp */
output( "\tmovl 0xa0(%%edx),%%esi\n"); /* Esi */
output( "\tmovl 0x9c(%%edx),%%edi\n"); /* Edi */