diff --git a/bochs/cpu/cpu.h b/bochs/cpu/cpu.h index ed1ef00ef..a5fa6ef4d 100644 --- a/bochs/cpu/cpu.h +++ b/bochs/cpu/cpu.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: cpu.h,v 1.524 2008-09-12 20:59:31 sshwarts Exp $ +// $Id: cpu.h,v 1.525 2008-09-16 18:28:53 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -3783,7 +3783,7 @@ IMPLEMENT_EFLAG_SET_ACCESSOR_TF( 8) #define BxGroup15 BxGroupN #define BxGroup16 BxGroupN -#define BxFPGroup BxGroupN +#define BxGroupFP BxGroupN // diff --git a/bochs/cpu/fetchdecode.cc b/bochs/cpu/fetchdecode.cc index 42addfcb9..0dad60f1d 100644 --- a/bochs/cpu/fetchdecode.cc +++ b/bochs/cpu/fetchdecode.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: fetchdecode.cc,v 1.212 2008-09-12 20:59:31 sshwarts Exp $ +// $Id: fetchdecode.cc,v 1.213 2008-09-16 18:28:53 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -414,14 +414,14 @@ static const BxOpcodeInfo_t BxOpcodeInfo32R[512*2] = { /* D6 /wr */ { 0, BX_IA_SALC }, /* D7 /wr */ { 0, BX_IA_XLAT }, #if BX_SUPPORT_FPU - /* D8 /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* D9 /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DA /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DB /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DC /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DD /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DE /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DF /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, + /* D8 /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointD8 }, + /* D9 /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointD9 }, + /* DA /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDA }, + /* DB /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDB }, + /* DC /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDC }, + /* DD /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDD }, + /* DE /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDE }, + /* DF /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDF }, #else /* D8 /wr */ { 0, BX_IA_FPU_ESC }, /* D9 /wr */ { 0, BX_IA_FPU_ESC }, @@ -977,14 +977,14 @@ static const BxOpcodeInfo_t BxOpcodeInfo32R[512*2] = { /* D6 /dr */ { 0, BX_IA_SALC }, /* D7 /dr */ { 0, BX_IA_XLAT }, #if BX_SUPPORT_FPU - /* D8 /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* D9 /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DA /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DB /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DC /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DD /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DE /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DF /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, + /* D8 /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointD8 }, + /* D9 /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointD9 }, + /* DA /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDA }, + /* DB /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDB }, + /* DC /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDC }, + /* DD /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDD }, + /* DE /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDE }, + /* DF /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDF }, #else /* D8 /dr */ { 0, BX_IA_FPU_ESC }, /* D9 /dr */ { 0, BX_IA_FPU_ESC }, @@ -1547,14 +1547,14 @@ static const BxOpcodeInfo_t BxOpcodeInfo32M[512*2] = { /* D6 /wm */ { 0, BX_IA_SALC }, /* D7 /wm */ { 0, BX_IA_XLAT }, #if BX_SUPPORT_FPU - /* D8 /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupD8 }, - /* D9 /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupD9 }, - /* DA /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDA }, - /* DB /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDB }, - /* DC /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDC }, - /* DD /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDD }, - /* DE /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDE }, - /* DF /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDF }, + /* D8 /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupD8 }, + /* D9 /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupD9 }, + /* DA /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDA }, + /* DB /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDB }, + /* DC /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDC }, + /* DD /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDD }, + /* DE /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDE }, + /* DF /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDF }, #else /* D8 /wm */ { 0, BX_IA_FPU_ESC }, /* D9 /wm */ { 0, BX_IA_FPU_ESC }, @@ -2110,14 +2110,14 @@ static const BxOpcodeInfo_t BxOpcodeInfo32M[512*2] = { /* D6 /dm */ { 0, BX_IA_SALC }, /* D7 /dm */ { 0, BX_IA_XLAT }, #if BX_SUPPORT_FPU - /* D8 /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupD8 }, - /* D9 /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupD9 }, - /* DA /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDA }, - /* DB /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDB }, - /* DC /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDC }, - /* DD /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDD }, - /* DE /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDE }, - /* DF /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDF }, + /* D8 /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupD8 }, + /* D9 /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupD9 }, + /* DA /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDA }, + /* DB /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDB }, + /* DC /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDC }, + /* DD /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDD }, + /* DE /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDE }, + /* DF /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDF }, #else /* D8 /dm */ { 0, BX_IA_FPU_ESC }, /* D9 /dm */ { 0, BX_IA_FPU_ESC }, @@ -2780,14 +2780,9 @@ modrm_done: break; } continue; -#if BX_SUPPORT_FPU case BxFPEscape: - { - int index = (b1-0xD8)*64 + (0x3f & b2); - OpcodeInfoPtr = &(OpcodeInfoPtr->AnotherArray[index]); - } + OpcodeInfoPtr = &(OpcodeInfoPtr->AnotherArray[b2 & 0x3f]); break; -#endif default: BX_PANIC(("fetchdecode: Unknown opcode group")); } diff --git a/bochs/cpu/fetchdecode.h b/bochs/cpu/fetchdecode.h index 9f907b461..d3c143f43 100755 --- a/bochs/cpu/fetchdecode.h +++ b/bochs/cpu/fetchdecode.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: fetchdecode.h,v 1.76 2008-08-29 20:43:05 sshwarts Exp $ +// $Id: fetchdecode.h,v 1.77 2008-09-16 18:28:53 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (c) 2005 Stanislav Shwartsman @@ -181,7 +181,7 @@ static const BxOpcodeInfo_t BxOpcodeInfo_FPGroupDF[8] = { }; // 512 entries for second byte of floating point instructions. (when mod==11b) -static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPoint[512] = { +static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPointD8[64] = { // D8 (modrm is outside 00h - BFh) (mod == 11) /* D8 C0 */ { 0, BX_IA_FADD_ST0_STj }, /* D8 C1 */ { 0, BX_IA_FADD_ST0_STj }, @@ -246,8 +246,10 @@ static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPoint[512] = { /* D8 FC */ { 0, BX_IA_FDIVR_ST0_STj }, /* D8 FD */ { 0, BX_IA_FDIVR_ST0_STj }, /* D8 FE */ { 0, BX_IA_FDIVR_ST0_STj }, - /* D8 FF */ { 0, BX_IA_FDIVR_ST0_STj }, + /* D8 FF */ { 0, BX_IA_FDIVR_ST0_STj } +}; +static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPointD9[64] = { // D9 (modrm is outside 00h - BFh) (mod == 11) /* D9 C0 */ { 0, BX_IA_FLD_STi }, /* D9 C1 */ { 0, BX_IA_FLD_STi }, @@ -312,8 +314,10 @@ static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPoint[512] = { /* D9 FC */ { 0, BX_IA_FRNDINT }, /* D9 FD */ { 0, BX_IA_FSCALE }, /* D9 FE */ { 0, BX_IA_FSIN }, - /* D9 FF */ { 0, BX_IA_FCOS }, + /* D9 FF */ { 0, BX_IA_FCOS } +}; +static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPointDA[64] = { // DA (modrm is outside 00h - BFh) (mod == 11) /* DA C0 */ { 0, BX_IA_FCMOV_ST0_STj }, /* DA C1 */ { 0, BX_IA_FCMOV_ST0_STj }, @@ -378,8 +382,10 @@ static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPoint[512] = { /* DA FC */ { 0, BX_IA_ERROR }, /* DA FD */ { 0, BX_IA_ERROR }, /* DA FE */ { 0, BX_IA_ERROR }, - /* DA FF */ { 0, BX_IA_ERROR }, + /* DA FF */ { 0, BX_IA_ERROR } +}; +static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPointDB[64] = { // DB (modrm is outside 00h - BFh) (mod == 11) /* DB C0 */ { 0, BX_IA_FCMOV_ST0_STj }, /* DB C1 */ { 0, BX_IA_FCMOV_ST0_STj }, @@ -444,8 +450,10 @@ static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPoint[512] = { /* DB FC */ { 0, BX_IA_ERROR }, /* DB FD */ { 0, BX_IA_ERROR }, /* DB FE */ { 0, BX_IA_ERROR }, - /* DB FF */ { 0, BX_IA_ERROR }, + /* DB FF */ { 0, BX_IA_ERROR } +}; +static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPointDC[64] = { // DC (modrm is outside 00h - BFh) (mod == 11) /* DC C0 */ { 0, BX_IA_FADD_STi_ST0 }, /* DC C1 */ { 0, BX_IA_FADD_STi_ST0 }, @@ -510,8 +518,10 @@ static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPoint[512] = { /* DC FC */ { 0, BX_IA_FDIV_STi_ST0 }, /* DC FD */ { 0, BX_IA_FDIV_STi_ST0 }, /* DC FE */ { 0, BX_IA_FDIV_STi_ST0 }, - /* DC FF */ { 0, BX_IA_FDIV_STi_ST0 }, + /* DC FF */ { 0, BX_IA_FDIV_STi_ST0 } +}; +static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPointDD[64] = { // DD (modrm is outside 00h - BFh) (mod == 11) /* DD C0 */ { 0, BX_IA_FFREE_STi }, /* DD C1 */ { 0, BX_IA_FFREE_STi }, @@ -576,8 +586,10 @@ static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPoint[512] = { /* DD FC */ { 0, BX_IA_ERROR }, /* DD FD */ { 0, BX_IA_ERROR }, /* DD FE */ { 0, BX_IA_ERROR }, - /* DD FF */ { 0, BX_IA_ERROR }, + /* DD FF */ { 0, BX_IA_ERROR } +}; +static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPointDE[64] = { // DE (modrm is outside 00h - BFh) (mod == 11) // all instructions pop FPU stack /* DE C0 */ { 0, BX_IA_FADD_STi_ST0 }, @@ -643,8 +655,10 @@ static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPoint[512] = { /* DE FC */ { 0, BX_IA_FDIV_STi_ST0 }, /* DE FD */ { 0, BX_IA_FDIV_STi_ST0 }, /* DE FE */ { 0, BX_IA_FDIV_STi_ST0 }, - /* DE FF */ { 0, BX_IA_FDIV_STi_ST0 }, + /* DE FF */ { 0, BX_IA_FDIV_STi_ST0 } +}; +static const BxOpcodeInfo_t BxOpcodeInfo_FloatingPointDF[64] = { // DF (modrm is outside 00h - BFh) (mod == 11) /* DF C0 */ { 0, BX_IA_FFREEP_STi }, // 287+ compatibility opcode /* DF C1 */ { 0, BX_IA_FFREEP_STi }, diff --git a/bochs/cpu/fetchdecode64.cc b/bochs/cpu/fetchdecode64.cc index 4446704f9..8809cee1c 100644 --- a/bochs/cpu/fetchdecode64.cc +++ b/bochs/cpu/fetchdecode64.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: fetchdecode64.cc,v 1.218 2008-09-12 20:59:31 sshwarts Exp $ +// $Id: fetchdecode64.cc,v 1.219 2008-09-16 18:28:53 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -397,14 +397,14 @@ static const BxOpcodeInfo_t BxOpcodeInfo64R[512*3] = { /* D5 /wr */ { 0, BX_IA_ERROR }, /* D6 /wr */ { 0, BX_IA_ERROR }, /* D7 /wr */ { 0, BX_IA_XLAT }, - /* D8 /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* D9 /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DA /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DB /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DC /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DD /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DE /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DF /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, + /* D8 /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointD8 }, + /* D9 /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointD9 }, + /* DA /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDA }, + /* DB /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDB }, + /* DC /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDC }, + /* DD /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDD }, + /* DE /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDE }, + /* DF /wr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDF }, /* E0 /wr */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPNE64_Jb }, /* E1 /wr */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPE64_Jb }, /* E2 /wr */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOP64_Jb }, @@ -924,14 +924,14 @@ static const BxOpcodeInfo_t BxOpcodeInfo64R[512*3] = { /* D5 /dr */ { 0, BX_IA_ERROR }, /* D6 /dr */ { 0, BX_IA_ERROR }, /* D7 /dr */ { 0, BX_IA_XLAT }, - /* D8 /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* D9 /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DA /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DB /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DC /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DD /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DE /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DF /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, + /* D8 /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointD8 }, + /* D9 /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointD9 }, + /* DA /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDA }, + /* DB /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDB }, + /* DC /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDC }, + /* DD /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDD }, + /* DE /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDE }, + /* DF /dr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDF }, /* E0 /dr */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPNE64_Jb }, /* E1 /dr */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPE64_Jb }, /* E2 /dr */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOP64_Jb }, @@ -1451,14 +1451,14 @@ static const BxOpcodeInfo_t BxOpcodeInfo64R[512*3] = { /* D5 /qr */ { 0, BX_IA_ERROR }, /* D6 /qr */ { 0, BX_IA_ERROR }, /* D7 /qr */ { 0, BX_IA_XLAT }, - /* D8 /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* D9 /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DA /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DB /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DC /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DD /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DE /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, - /* DF /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPoint }, + /* D8 /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointD8 }, + /* D9 /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointD9 }, + /* DA /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDA }, + /* DB /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDB }, + /* DC /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDC }, + /* DD /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDD }, + /* DE /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDE }, + /* DF /qr */ { BxFPEscape, BX_IA_ERROR, BxOpcodeInfo_FloatingPointDF }, /* E0 /qr */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPNE64_Jb }, /* E1 /qr */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPE64_Jb }, /* E2 /qr */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOP64_Jb }, @@ -1984,14 +1984,14 @@ static const BxOpcodeInfo_t BxOpcodeInfo64M[512*3] = { /* D5 /wm */ { 0, BX_IA_ERROR }, /* D6 /wm */ { 0, BX_IA_ERROR }, /* D7 /wm */ { 0, BX_IA_XLAT }, - /* D8 /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupD8 }, - /* D9 /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupD9 }, - /* DA /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDA }, - /* DB /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDB }, - /* DC /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDC }, - /* DD /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDD }, - /* DE /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDE }, - /* DF /wm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDF }, + /* D8 /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupD8 }, + /* D9 /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupD9 }, + /* DA /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDA }, + /* DB /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDB }, + /* DC /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDC }, + /* DD /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDD }, + /* DE /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDE }, + /* DF /wm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDF }, /* E0 /wm */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPNE64_Jb }, /* E1 /wm */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPE64_Jb }, /* E2 /wm */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOP64_Jb }, @@ -2511,14 +2511,14 @@ static const BxOpcodeInfo_t BxOpcodeInfo64M[512*3] = { /* D5 /dm */ { 0, BX_IA_ERROR }, /* D6 /dm */ { 0, BX_IA_ERROR }, /* D7 /dm */ { 0, BX_IA_XLAT }, - /* D8 /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupD8 }, - /* D9 /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupD9 }, - /* DA /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDA }, - /* DB /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDB }, - /* DC /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDC }, - /* DD /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDD }, - /* DE /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDE }, - /* DF /dm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDF }, + /* D8 /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupD8 }, + /* D9 /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupD9 }, + /* DA /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDA }, + /* DB /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDB }, + /* DC /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDC }, + /* DD /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDD }, + /* DE /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDE }, + /* DF /dm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDF }, /* E0 /dm */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPNE64_Jb }, /* E1 /dm */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPE64_Jb }, /* E2 /dm */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOP64_Jb }, @@ -3038,14 +3038,14 @@ static const BxOpcodeInfo_t BxOpcodeInfo64M[512*3] = { /* D5 /qm */ { 0, BX_IA_ERROR }, /* D6 /qm */ { 0, BX_IA_ERROR }, /* D7 /qm */ { 0, BX_IA_XLAT }, - /* D8 /qm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupD8 }, - /* D9 /qm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupD9 }, - /* DA /qm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDA }, - /* DB /qm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDB }, - /* DC /qm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDC }, - /* DD /qm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDD }, - /* DE /qm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDE }, - /* DF /qm */ { BxFPGroup, BX_IA_ERROR, BxOpcodeInfo_FPGroupDF }, + /* D8 /qm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupD8 }, + /* D9 /qm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupD9 }, + /* DA /qm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDA }, + /* DB /qm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDB }, + /* DC /qm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDC }, + /* DD /qm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDD }, + /* DE /qm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDE }, + /* DF /qm */ { BxGroupFP, BX_IA_ERROR, BxOpcodeInfo_FPGroupDF }, /* E0 /qm */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPNE64_Jb }, /* E1 /qm */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOPE64_Jb }, /* E2 /qm */ { BxImmediate_BrOff8 | BxTraceEnd, BX_IA_LOOP64_Jb }, @@ -3694,10 +3694,7 @@ modrm_done: } continue; case BxFPEscape: - { - int index = (b1-0xD8)*64 + (0x3f & b2); - OpcodeInfoPtr = &(OpcodeInfoPtr->AnotherArray[index]); - } + OpcodeInfoPtr = &(OpcodeInfoPtr->AnotherArray[b2 & 0x3f]); break; default: BX_PANIC(("fetchdecode: Unknown opcode group"));