Emulate (well, ignore) mov cr0,eax and mov eax,cr0.

This commit is contained in:
Marcus Meissner 1999-03-12 16:55:46 +00:00 committed by Alexandre Julliard
parent ea1640fc0c
commit 9d9e0606a4
1 changed files with 40 additions and 18 deletions

View File

@ -411,9 +411,21 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
case 0x0f: /* extended instruction */
switch(instr[1])
{
case 0x20: /* mov cr4, eax */
if (instr[2]!=0xe0)
break;
case 0x22: /* mov eax, crX */
switch (instr[2]) {
case 0xc0:
fprintf(stderr,"mov eax,cr0 at 0x%08lx, EAX=0x%08lx\n",
EIP_sig(context),EAX_sig(context)
);
EIP_sig(context) += prefixlen+3;
return TRUE;
default:
break; /*fallthrough to bad instruction handling */
}
break; /*fallthrough to bad instruction handling */
case 0x20: /* mov crX, eax */
switch (instr[2]) {
case 0xe0: /* mov cr4, eax */
/* CR4 register . See linux/arch/i386/mm/init.c, X86_CR4_ defs
* bit 0: VME Virtual Mode Exception ?
* bit 1: PVI Protected mode Virtual Interrupt
@ -429,6 +441,16 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
EAX_sig(context) = 0;
EIP_sig(context) += prefixlen+3;
return TRUE;
case 0xc0: /* mov cr0, eax */
fprintf(stderr,"mov cr0,eax at 0x%08lx\n",EIP_sig(context));
EAX_sig(context) = 0x10; /* FIXME: set more bits ? */
EIP_sig(context) += prefixlen+3;
return TRUE;
default: /* fallthrough to illegal instruction */
break;
}
/* fallthrough to illegal instruction */
break;
#ifdef FS_sig
case 0xa1: /* pop fs */
{