mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
- Initialize the fpu control register within the context structure.
svn path=/trunk/; revision=4605
This commit is contained in:
parent
371b0fd87e
commit
b5d5cf6145
2 changed files with 9 additions and 2 deletions
|
@ -378,7 +378,10 @@ NTSTATUS STDCALL RtlInitializeContextEx
|
||||||
memset(Context, 0, sizeof(CONTEXT));
|
memset(Context, 0, sizeof(CONTEXT));
|
||||||
|
|
||||||
Context->ContextFlags = CONTEXT_FULL;
|
Context->ContextFlags = CONTEXT_FULL;
|
||||||
|
Context->FloatSave.ControlWord = 0xffff037f;
|
||||||
|
Context->FloatSave.StatusWord = 0xffff0000;
|
||||||
|
Context->FloatSave.TagWord = 0xffffffff;
|
||||||
|
Context->FloatSave.DataSelector = 0xffff0000;
|
||||||
Context->Eip = (ULONG_PTR)StartAddress;
|
Context->Eip = (ULONG_PTR)StartAddress;
|
||||||
Context->SegGs = USER_DS;
|
Context->SegGs = USER_DS;
|
||||||
Context->SegFs = TEB_SELECTOR;
|
Context->SegFs = TEB_SELECTOR;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: init.c,v 1.39 2003/04/26 23:13:31 hyperion Exp $
|
/* $Id: init.c,v 1.40 2003/04/27 18:58:00 hbirr Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: ntoskrnl/ldr/init.c
|
* FILE: ntoskrnl/ldr/init.c
|
||||||
|
@ -507,6 +507,10 @@ LdrLoadInitialProcess(PHANDLE ProcessHandle,
|
||||||
#if defined(_M_IX86)
|
#if defined(_M_IX86)
|
||||||
memset(&Context,0,sizeof(CONTEXT));
|
memset(&Context,0,sizeof(CONTEXT));
|
||||||
Context.ContextFlags = CONTEXT_FULL;
|
Context.ContextFlags = CONTEXT_FULL;
|
||||||
|
Context.FloatSave.ControlWord = 0xffff037f;
|
||||||
|
Context.FloatSave.StatusWord = 0xffff0000;
|
||||||
|
Context.FloatSave.TagWord = 0xffffffff;
|
||||||
|
Context.FloatSave.DataSelector = 0xffff0000;
|
||||||
Context.Eip = (ULONG_PTR)(ImageBaseAddress + (ULONG_PTR)Sii.EntryPoint);
|
Context.Eip = (ULONG_PTR)(ImageBaseAddress + (ULONG_PTR)Sii.EntryPoint);
|
||||||
Context.SegCs = USER_CS;
|
Context.SegCs = USER_CS;
|
||||||
Context.SegDs = USER_DS;
|
Context.SegDs = USER_DS;
|
||||||
|
|
Loading…
Reference in a new issue