From 83b8bbedff7c3492a76da61f93e6267359008d14 Mon Sep 17 00:00:00 2001 From: Christophe Bothamy Date: Sat, 26 Apr 2003 10:02:03 +0000 Subject: [PATCH] - fix REX MOVB immediate for x86_64 (patch by Arnd Bergmann) (bug [ 720776 ] REX MOVB immediate broken for x86_64) --- bochs/cpu/data_xfer8.cc | 4 ++-- bochs/cpu/fetchdecode64.cc | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/bochs/cpu/data_xfer8.cc b/bochs/cpu/data_xfer8.cc index 259b9fefa..c9d6e67f4 100644 --- a/bochs/cpu/data_xfer8.cc +++ b/bochs/cpu/data_xfer8.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: data_xfer8.cc,v 1.14 2002-10-25 18:26:27 sshwarts Exp $ +// $Id: data_xfer8.cc,v 1.15 2003-04-26 10:02:02 cbothamy Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -37,7 +37,7 @@ void BX_CPU_C::MOV_RLIb(bxInstruction_c *i) { - BX_CPU_THIS_PTR gen_reg[i->b1() & 0x03].word.byte.rl = i->Ib(); + BX_READ_8BIT_REGx(i->opcodeReg(),i->extend8bitL()) = i->Ib(); } void diff --git a/bochs/cpu/fetchdecode64.cc b/bochs/cpu/fetchdecode64.cc index 80ca65d0f..720fb4e65 100644 --- a/bochs/cpu/fetchdecode64.cc +++ b/bochs/cpu/fetchdecode64.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: fetchdecode64.cc,v 1.47 2003-04-23 17:52:59 sshwarts Exp $ +// $Id: fetchdecode64.cc,v 1.48 2003-04-26 10:02:03 cbothamy Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -1597,10 +1597,10 @@ static BxOpcodeInfo_t BxOpcodeInfo64[512*3] = { /* B1 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, /* B2 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, /* B3 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, - /* B4 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, - /* B5 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, - /* B6 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, - /* B7 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, + /* B4 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, + /* B5 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, + /* B6 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, + /* B7 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, /* B8 */ { BxImmediate_Iv, &BX_CPU_C::MOV_RXIw }, /* B9 */ { BxImmediate_Iv, &BX_CPU_C::MOV_RXIw }, /* BA */ { BxImmediate_Iv, &BX_CPU_C::MOV_RXIw }, @@ -2115,10 +2115,10 @@ static BxOpcodeInfo_t BxOpcodeInfo64[512*3] = { /* B1 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, /* B2 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, /* B3 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, - /* B4 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, - /* B5 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, - /* B6 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, - /* B7 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, + /* B4 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, + /* B5 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, + /* B6 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, + /* B7 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, /* B8 */ { BxImmediate_Iv, &BX_CPU_C::MOV_ERXId }, /* B9 */ { BxImmediate_Iv, &BX_CPU_C::MOV_ERXId }, /* BA */ { BxImmediate_Iv, &BX_CPU_C::MOV_ERXId }, @@ -2630,10 +2630,10 @@ static BxOpcodeInfo_t BxOpcodeInfo64[512*3] = { /* B1 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, /* B2 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, /* B3 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, - /* B4 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, - /* B5 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, - /* B6 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, - /* B7 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RHIb }, + /* B4 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, + /* B5 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, + /* B6 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, + /* B7 */ { BxImmediate_Ib, &BX_CPU_C::MOV_RLIb }, /* B8 */ { BxImmediate_Iq, &BX_CPU_C::MOV_RRXIq }, /* B9 */ { BxImmediate_Iq, &BX_CPU_C::MOV_RRXIq }, /* BA */ { BxImmediate_Iq, &BX_CPU_C::MOV_RRXIq },