From: Eugene Korenevsky Date: Mon, 4 May 2015 09:56:21 +0000 (+0200) Subject: test_x86_emulate: extend EFLAGS check of CMPXCHG test X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3361 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=20fd4b70a7647656812b8f276510e09b252db9f7;p=xen.git test_x86_emulate: extend EFLAGS check of CMPXCHG test 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 --- diff --git a/tools/tests/x86_emulator/test_x86_emulator.c b/tools/tests/x86_emulator/test_x86_emulator.c index 66d5eff163..b789edf0ca 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&0xad5) != 0xa91) || (regs.eax != 0xAABBCCAA) || (regs.ecx != 0xFF) || (regs.eip != (unsigned long)&instr[4]) )