diff --git a/dlls/commdlg.dll16/filedlg.c b/dlls/commdlg.dll16/filedlg.c index 99da47a229d..5b72bfab100 100644 --- a/dlls/commdlg.dll16/filedlg.c +++ b/dlls/commdlg.dll16/filedlg.c @@ -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 ); diff --git a/dlls/krnl386.exe16/ne_module.c b/dlls/krnl386.exe16/ne_module.c index 1979358f4d7..76ef3557068 100644 --- a/dlls/krnl386.exe16/ne_module.c +++ b/dlls/krnl386.exe16/ne_module.c @@ -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; diff --git a/dlls/krnl386.exe16/ne_segment.c b/dlls/krnl386.exe16/ne_segment.c index 1ceb7143583..000c5760f84 100644 --- a/dlls/krnl386.exe16/ne_segment.c +++ b/dlls/krnl386.exe16/ne_segment.c @@ -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); diff --git a/dlls/krnl386.exe16/thunk.c b/dlls/krnl386.exe16/thunk.c index b4ba7d23651..c8ad3824c0f 100644 --- a/dlls/krnl386.exe16/thunk.c +++ b/dlls/krnl386.exe16/thunk.c @@ -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); diff --git a/dlls/system.drv16/system.c b/dlls/system.drv16/system.c index 8bb5cf910df..b6fd51c05f0 100644 --- a/dlls/system.drv16/system.c +++ b/dlls/system.drv16/system.c @@ -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); diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 1adbda065c0..87183460266 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -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 */