[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/2] test_x86_emulate: adjust CMPXCHG test


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Eugene Korenevsky <ekorenevsky@xxxxxxxxx>
  • Date: Wed, 29 Apr 2015 00:53:01 +0000
  • Delivery-date: Tue, 28 Apr 2015 21:53:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

CMPXCHG: in the case of inequality of the rAX and the operand,
need to check CF, PF, AF, SF and OF flags as well.

This adjustment covers the fix of incorrect comparison during
CMPXCHG emulation.

Signed-off-by: Eugene Korenevsky <ekorenevsky@xxxxxxxxx>
---
 tools/tests/x86_emulator/test_x86_emulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/tests/x86_emulator/test_x86_emulator.c 
b/tools/tests/x86_emulator/test_x86_emulator.c
index 66d5eff..64a5b2e 100644
--- a/tools/tests/x86_emulator/test_x86_emulator.c
+++ b/tools/tests/x86_emulator/test_x86_emulator.c
@@ -288,7 +288,7 @@ int main(int argc, char **argv)
     rc = x86_emulate(&ctxt, &emulops);
     if ( (rc != X86EMUL_OKAY) || 
          (*res != 0x923456AA) || 
-         ((regs.eflags&0x240) != 0x200) ||
+         ((regs.eflags&0x8d5) != 0x891) ||
          (regs.eax != 0xAABBCCAA) ||
          (regs.ecx != 0xFF) ||
          (regs.eip != (unsigned long)&instr[4]) )
-- 
2.0.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.