From ed11c3a778fc142a5fa531beaea4520fef571567 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Fri, 7 Nov 2014 19:20:38 +0000 Subject: [PATCH] [FAST486] Fix BT, BTC, BTS and BTR. svn path=/trunk/; revision=65310 --- reactos/lib/fast486/extraops.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/lib/fast486/extraops.c b/reactos/lib/fast486/extraops.c index 1f2fc727697..48e25f4ada9 100644 --- a/reactos/lib/fast486/extraops.c +++ b/reactos/lib/fast486/extraops.c @@ -752,7 +752,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBitTest) * For memory operands, add the bit offset divided by * the data size to the address */ - ModRegRm.MemoryAddress += BitNumber / DataSize; + ModRegRm.MemoryAddress += (BitNumber / DataSize) * (DataSize / 8); } /* Normalize the bit number */ @@ -936,7 +936,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBts) * For memory operands, add the bit offset divided by * the data size to the address */ - ModRegRm.MemoryAddress += BitNumber / DataSize; + ModRegRm.MemoryAddress += (BitNumber / DataSize) * (DataSize / 8); } /* Normalize the bit number */ @@ -1378,7 +1378,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtr) * For memory operands, add the bit offset divided by * the data size to the address */ - ModRegRm.MemoryAddress += BitNumber / DataSize; + ModRegRm.MemoryAddress += (BitNumber / DataSize) * (DataSize / 8); } /* Normalize the bit number */ @@ -1592,7 +1592,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtc) * For memory operands, add the bit offset divided by * the data size to the address */ - ModRegRm.MemoryAddress += BitNumber / DataSize; + ModRegRm.MemoryAddress += (BitNumber / DataSize) * (DataSize / 8); } /* Normalize the bit number */