From 6640a3e6f0274f31ac2042ffcf47607d0b303eef Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 19 Aug 2008 13:59:24 +0000 Subject: [PATCH] Fix ROR byte flag calculations. (thank you h-a-l-9000 for your help in determing which instruction was broken) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3205 --- src/cpu/core_dynrec/operators.h | 2 +- src/cpu/instructions.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpu/core_dynrec/operators.h b/src/cpu/core_dynrec/operators.h index 65b3dbfb..be667dcd 100644 --- a/src/cpu/core_dynrec/operators.h +++ b/src/cpu/core_dynrec/operators.h @@ -754,7 +754,7 @@ static Bit8u DRC_CALL_CONV dynrec_rol_byte_simple(Bit8u op1,Bit8u op2) { static Bit8u DRC_CALL_CONV dynrec_ror_byte(Bit8u op1,Bit8u op2) DRC_FC; static Bit8u DRC_CALL_CONV dynrec_ror_byte(Bit8u op1,Bit8u op2) { if (!(op2&0x7)) { - if (op2&0x10) { + if (op2&0x18) { FillFlagsNoCFOF(); SETFLAGBIT(CF,op1>>7); SETFLAGBIT(OF,(op1>>7) ^ ((op1>>6) & 1)); diff --git a/src/cpu/instructions.h b/src/cpu/instructions.h index 45b2c795..1a69ffb4 100644 --- a/src/cpu/instructions.h +++ b/src/cpu/instructions.h @@ -277,7 +277,7 @@ #define RORB(op1,op2,load,save) \ if (!(op2&0x7)) { \ - if (op2&0x10) { \ + if (op2&0x18) { \ FillFlagsNoCFOF(); \ SETFLAGBIT(CF,op1>>7); \ SETFLAGBIT(OF,(op1>>7) ^ ((op1>>6) & 1)); \