diff --git a/bochs/cpu/cpu.h b/bochs/cpu/cpu.h index 6b7ed7c8b..5a56bd392 100644 --- a/bochs/cpu/cpu.h +++ b/bochs/cpu/cpu.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: cpu.h,v 1.683 2010-07-22 20:19:00 sshwarts Exp $ +// $Id: cpu.h,v 1.684 2010-09-07 19:54:49 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001-2010 The Bochs Project @@ -3835,13 +3835,13 @@ enum { #define BxImmediate_IdIw 0x0008 // call_Ap, not encodable in 64-bit mode #define BxImmediate_Id 0x0009 // 32 bit #define BxImmediate_O 0x000A // MOV_ALOd, mov_OdAL, mov_eAXOv, mov_OveAX -#define BxImmediate_BrOff8 0x000B // Relative branch offset byte #if BX_SUPPORT_X86_64 -#define BxImmediate_Iq 0x000C // 64 bit override +#define BxImmediate_Iq 0x000B // 64 bit override #endif -#define BxImmediate_BrOff16 BxImmediate_Iw // Relative branch offset word, not encodable in 64-bit mode -#define BxImmediate_BrOff32 BxImmediate_Id // Relative branch offset dword +#define BxImmediate_BrOff8 BxImmediate_Ib_SE // Relative branch offset byte +#define BxImmediate_BrOff16 BxImmediate_Iw // Relative branch offset word, not encodable in 64-bit mode +#define BxImmediate_BrOff32 BxImmediate_Id // Relative branch offset dword // Lookup for opcode and attributes in another opcode tables // Totally 15 opcode groups supported diff --git a/bochs/cpu/fetchdecode.cc b/bochs/cpu/fetchdecode.cc index 1177844c9..c89f027f0 100644 --- a/bochs/cpu/fetchdecode.cc +++ b/bochs/cpu/fetchdecode.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: fetchdecode.cc,v 1.275 2010-07-22 20:12:25 sshwarts Exp $ +// $Id: fetchdecode.cc,v 1.276 2010-09-07 19:54:49 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001-2010 The Bochs Project @@ -2696,11 +2696,7 @@ modrm_done: break; case BxImmediate_Ib_SE: // Sign extend to OS size if (remain != 0) { - Bit8s temp8s = *iptr; - if (i->os32L()) - i->modRMForm.Id = (Bit32s) temp8s; - else - i->modRMForm.Iw = (Bit16s) temp8s; + i->modRMForm.Id = (Bit8s) (*iptr); remain--; } else { @@ -2725,15 +2721,6 @@ modrm_done: return(-1); } break; - case BxImmediate_BrOff8: - if (remain != 0) { - i->modRMForm.Id = (Bit8s) (*iptr); - remain--; - } - else { - return(-1); - } - break; case BxImmediate_IwIb: if (remain > 1) { i->IxIxForm.Iw = FetchWORD(iptr); diff --git a/bochs/cpu/fetchdecode64.cc b/bochs/cpu/fetchdecode64.cc index 924b0dc0f..f86361c3b 100644 --- a/bochs/cpu/fetchdecode64.cc +++ b/bochs/cpu/fetchdecode64.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: fetchdecode64.cc,v 1.271 2010-07-22 20:12:25 sshwarts Exp $ +// $Id: fetchdecode64.cc,v 1.272 2010-09-07 19:54:50 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001-2010 The Bochs Project @@ -3636,11 +3636,7 @@ modrm_done: break; case BxImmediate_Ib_SE: // Sign extend to OS size if (remain != 0) { - Bit8s temp8s = *iptr; - if (i->os32L()) - i->modRMForm.Id = (Bit32s) temp8s; - else - i->modRMForm.Iw = (Bit16s) temp8s; + i->modRMForm.Id = (Bit8s) (*iptr); remain--; } else { @@ -3674,15 +3670,6 @@ modrm_done: return(-1); } break; - case BxImmediate_BrOff8: - if (remain != 0) { - i->modRMForm.Id = (Bit8s) (*iptr); - remain--; - } - else { - return(-1); - } - break; case BxImmediate_IwIb: if (remain > 2) { i->IxIxForm.Iw = FetchWORD(iptr); diff --git a/bochs/cpu/proc_ctrl.cc b/bochs/cpu/proc_ctrl.cc index e5895f320..e8e5d79c1 100644 --- a/bochs/cpu/proc_ctrl.cc +++ b/bochs/cpu/proc_ctrl.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: proc_ctrl.cc,v 1.336 2010-07-22 20:12:25 sshwarts Exp $ +// $Id: proc_ctrl.cc,v 1.337 2010-09-07 19:54:50 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001-2010 The Bochs Project @@ -878,7 +878,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::SYSENTER(bxInstruction_c *i) updateFetchModeMask(/* CS reloaded */); #endif -#if BX_CPU_LEVEL >= 4 && BX_SUPPORT_ALIGNMENT_CHECK +#if BX_SUPPORT_ALIGNMENT_CHECK BX_CPU_THIS_PTR alignment_check_mask = 0; // CPL=0 #endif