Commit 2a43bb22 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

krnl386.exe: If we use operands order of AT&T asm syntax, we'd better use % for…

krnl386.exe: If we use operands order of AT&T asm syntax, we'd better use % for registers as in winedbg and GNU assembler to avoid confusion.
parent 834512f1
...@@ -512,23 +512,23 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context ) ...@@ -512,23 +512,23 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
case 0x0f: /* extended instruction */ case 0x0f: /* extended instruction */
switch(instr[1]) switch(instr[1])
{ {
case 0x22: /* mov eax, crX */ case 0x22: /* mov %eax, %crX */
switch (instr[2]) switch (instr[2])
{ {
case 0xc0: case 0xc0:
ERR("mov eax,cr0 at 0x%08x, EAX=0x%08x\n", ERR("mov %%eax, %%cr0 at 0x%08x, EAX=0x%08x\n",
context->Eip,context->Eax ); context->Eip,context->Eax );
context->Eip += prefixlen+3; context->Eip += prefixlen+3;
return ExceptionContinueExecution; return ExceptionContinueExecution;
default: default:
break; /*fallthrough to bad instruction handling */ break; /* Fallthrough to bad instruction handling */
} }
break; /*fallthrough to bad instruction handling */ break; /* Fallthrough to bad instruction handling */
case 0x20: /* mov crX, eax */ case 0x20: /* mov %crX, %eax */
switch (instr[2]) switch (instr[2])
{ {
case 0xe0: /* mov cr4, eax */ case 0xe0: /* mov %cr4, %eax */
/* CR4 register . See linux/arch/i386/mm/init.c, X86_CR4_ defs /* CR4 register: See linux/arch/i386/mm/init.c, X86_CR4_ defs
* bit 0: VME Virtual Mode Exception ? * bit 0: VME Virtual Mode Exception ?
* bit 1: PVI Protected mode Virtual Interrupt * bit 1: PVI Protected mode Virtual Interrupt
* bit 2: TSD Timestamp disable * bit 2: TSD Timestamp disable
...@@ -539,30 +539,30 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context ) ...@@ -539,30 +539,30 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
* bit 7: PGE Enable global pages * bit 7: PGE Enable global pages
* bit 8: PCE Enable performance counters at IPL3 * bit 8: PCE Enable performance counters at IPL3
*/ */
ERR("mov cr4,eax at 0x%08x\n",context->Eip); ERR("mov %%cr4, %%eax at 0x%08x\n",context->Eip);
context->Eax = 0; context->Eax = 0;
context->Eip += prefixlen+3; context->Eip += prefixlen+3;
return ExceptionContinueExecution; return ExceptionContinueExecution;
case 0xc0: /* mov cr0, eax */ case 0xc0: /* mov %cr0, %eax */
ERR("mov cr0,eax at 0x%08x\n",context->Eip); ERR("mov %%cr0, %%eax at 0x%08x\n",context->Eip);
context->Eax = 0x10; /* FIXME: set more bits ? */ context->Eax = 0x10; /* FIXME: set more bits ? */
context->Eip += prefixlen+3; context->Eip += prefixlen+3;
return ExceptionContinueExecution; return ExceptionContinueExecution;
default: /* fallthrough to illegal instruction */ default: /* Fallthrough to illegal instruction */
break; break;
} }
/* fallthrough to illegal instruction */ /* Fallthrough to illegal instruction */
break; break;
case 0x21: /* mov drX, eax */ case 0x21: /* mov %drX, %eax */
switch (instr[2]) switch (instr[2])
{ {
case 0xc8: /* mov dr1, eax */ case 0xc8: /* mov %dr1, %eax */
TRACE("mov dr1,eax at 0x%08x\n",context->Eip); TRACE("mov %%dr1, %%eax at 0x%08x\n",context->Eip);
context->Eax = context->Dr1; context->Eax = context->Dr1;
context->Eip += prefixlen+3; context->Eip += prefixlen+3;
return ExceptionContinueExecution; return ExceptionContinueExecution;
case 0xf8: /* mov dr7, eax */ case 0xf8: /* mov %dr7, %eax */
TRACE("mov dr7,eax at 0x%08x\n",context->Eip); TRACE("mov %%dr7, %%eax at 0x%08x\n",context->Eip);
context->Eax = 0x400; context->Eax = 0x400;
context->Eip += prefixlen+3; context->Eip += prefixlen+3;
return ExceptionContinueExecution; return ExceptionContinueExecution;
...@@ -570,10 +570,10 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context ) ...@@ -570,10 +570,10 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
ERR("Unsupported DR register, eip+2 is %02x\n", instr[2]); ERR("Unsupported DR register, eip+2 is %02x\n", instr[2]);
/* fallthrough to illegal instruction */ /* fallthrough to illegal instruction */
break; break;
case 0x23: /* mov eax drX */ case 0x23: /* mov %eax, %drX */
switch (instr[2]) switch (instr[2])
{ {
case 0xc8: /* mov eax, dr1 */ case 0xc8: /* mov %eax, %dr1 */
context->Dr1 = context->Eax; context->Dr1 = context->Eax;
context->Eip += prefixlen+3; context->Eip += prefixlen+3;
return ExceptionContinueExecution; return ExceptionContinueExecution;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment