Emulate (well, ignore) mov cr0,eax and mov eax,cr0.
This commit is contained in:
parent
ea1640fc0c
commit
9d9e0606a4
|
@ -411,24 +411,46 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
|
||||||
case 0x0f: /* extended instruction */
|
case 0x0f: /* extended instruction */
|
||||||
switch(instr[1])
|
switch(instr[1])
|
||||||
{
|
{
|
||||||
case 0x20: /* mov cr4, eax */
|
case 0x22: /* mov eax, crX */
|
||||||
if (instr[2]!=0xe0)
|
switch (instr[2]) {
|
||||||
break;
|
case 0xc0:
|
||||||
/* CR4 register . See linux/arch/i386/mm/init.c, X86_CR4_ defs
|
fprintf(stderr,"mov eax,cr0 at 0x%08lx, EAX=0x%08lx\n",
|
||||||
* bit 0: VME Virtual Mode Exception ?
|
EIP_sig(context),EAX_sig(context)
|
||||||
* bit 1: PVI Protected mode Virtual Interrupt
|
);
|
||||||
* bit 2: TSD Timestamp disable
|
EIP_sig(context) += prefixlen+3;
|
||||||
* bit 3: DE Debugging extensions
|
return TRUE;
|
||||||
* bit 4: PSE Page size extensions
|
default:
|
||||||
* bit 5: PAE Physical address extension
|
break; /*fallthrough to bad instruction handling */
|
||||||
* bit 6: MCE Machine check enable
|
}
|
||||||
* bit 7: PGE Enable global pages
|
break; /*fallthrough to bad instruction handling */
|
||||||
* bit 8: PCE Enable performance counters at IPL3
|
case 0x20: /* mov crX, eax */
|
||||||
*/
|
switch (instr[2]) {
|
||||||
fprintf(stderr,"mov cr4,eax at 0x%08lx\n",EIP_sig(context));
|
case 0xe0: /* mov cr4, eax */
|
||||||
EAX_sig(context) = 0;
|
/* CR4 register . See linux/arch/i386/mm/init.c, X86_CR4_ defs
|
||||||
EIP_sig(context) += prefixlen+3;
|
* bit 0: VME Virtual Mode Exception ?
|
||||||
return TRUE;
|
* bit 1: PVI Protected mode Virtual Interrupt
|
||||||
|
* bit 2: TSD Timestamp disable
|
||||||
|
* bit 3: DE Debugging extensions
|
||||||
|
* bit 4: PSE Page size extensions
|
||||||
|
* bit 5: PAE Physical address extension
|
||||||
|
* bit 6: MCE Machine check enable
|
||||||
|
* bit 7: PGE Enable global pages
|
||||||
|
* bit 8: PCE Enable performance counters at IPL3
|
||||||
|
*/
|
||||||
|
fprintf(stderr,"mov cr4,eax at 0x%08lx\n",EIP_sig(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
|
#ifdef FS_sig
|
||||||
case 0xa1: /* pop fs */
|
case 0xa1: /* pop fs */
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue