From 072ddbe0832d003a7fa14a471211532ba03a0c1b Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Tue, 10 Nov 2009 19:52:58 +0000 Subject: [PATCH] Add correct 16bit BSWAP behavior in the interpreting cores Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3498 --- src/cpu/core_full/op.h | 8 ++++++-- src/cpu/core_full/optable.h | 16 +++++++-------- src/cpu/core_full/support.h | 3 ++- src/cpu/core_normal/prefix_0f.h | 32 +++++++++++++++--------------- src/cpu/core_normal/prefix_66_0f.h | 24 ++++++++++++++++++++++ src/cpu/instructions.h | 5 ++++- 6 files changed, 60 insertions(+), 28 deletions(-) diff --git a/src/cpu/core_full/op.h b/src/cpu/core_full/op.h index bfcb90d1..6c1ebc4d 100644 --- a/src/cpu/core_full/op.h +++ b/src/cpu/core_full/op.h @@ -584,9 +584,13 @@ switch (inst.code.op) { SETFLAGBIT(CF,(inst_op1_d & (1 << (inst_op2_d & 31)))); inst_op1_d&=~(1 << (inst_op2_d & 31)); break; - case O_BSWAP: + case O_BSWAPw: if (CPU_ArchitectureType>24)|((op1>>8)&0xFF00)|((op1<<8)&0xFF0000)|((op1<<24)&0xFF000000);