From 845af0dc2499064b57adeb8156b71e70d12032c6 Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Tue, 30 Mar 2010 16:39:57 +0000 Subject: [PATCH] decode fix --- bochs/cpu/fetchdecode.cc | 10 +++++----- bochs/cpu/fetchdecode64.cc | 14 +++++++------- bochs/cpu/fetchdecode_sse.h | 10 ++++++++-- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/bochs/cpu/fetchdecode.cc b/bochs/cpu/fetchdecode.cc index e9902a7ae..6e4e3d514 100644 --- a/bochs/cpu/fetchdecode.cc +++ b/bochs/cpu/fetchdecode.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: fetchdecode.cc,v 1.260 2010-03-30 15:01:08 sshwarts Exp $ +// $Id: fetchdecode.cc,v 1.261 2010-03-30 16:39:57 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001-2009 The Bochs Project @@ -484,7 +484,7 @@ static const BxOpcodeInfo_t BxOpcodeInfo32R[512*2] = { /* 0F 13 /wr */ { 0, BX_IA_ERROR }, // MOVLPS/PD SSE group /* 0F 14 /wr */ { BxPrefixSSE, BX_IA_UNPCKLPS_VpsWdq, BxOpcodeGroupSSE_0f14 }, /* 0F 15 /wr */ { BxPrefixSSE, BX_IA_UNPCKHPS_VpsWdq, BxOpcodeGroupSSE_0f15 }, - /* 0F 16 /wr */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16 }, + /* 0F 16 /wr */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16R }, /* 0F 17 /wr */ { 0, BX_IA_ERROR }, // MOHLPS/PD SSE group #if BX_CPU_LEVEL >= 6 /* 0F 18 /wr */ { 0, BX_IA_NOP }, // PREFETCH HINT @@ -1035,7 +1035,7 @@ static const BxOpcodeInfo_t BxOpcodeInfo32R[512*2] = { /* 0F 13 /dr */ { 0, BX_IA_ERROR }, // MOVLPS/PD SSE group /* 0F 14 /dr */ { BxPrefixSSE, BX_IA_UNPCKLPS_VpsWdq, BxOpcodeGroupSSE_0f14 }, /* 0F 15 /dr */ { BxPrefixSSE, BX_IA_UNPCKHPS_VpsWdq, BxOpcodeGroupSSE_0f15 }, - /* 0F 16 /dr */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16 }, + /* 0F 16 /dr */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16R }, /* 0F 17 /dr */ { 0, BX_IA_ERROR }, // MOHLPS/PD SSE group #if BX_CPU_LEVEL >= 6 /* 0F 18 /dr */ { 0, BX_IA_NOP }, // PREFETCH HINT @@ -1593,7 +1593,7 @@ static const BxOpcodeInfo_t BxOpcodeInfo32M[512*2] = { /* 0F 13 /wm */ { BxPrefixSSE, BX_IA_MOVLPS_MqVps, BxOpcodeGroupSSE_0f13M }, /* 0F 14 /wm */ { BxPrefixSSE, BX_IA_UNPCKLPS_VpsWdq, BxOpcodeGroupSSE_0f14 }, /* 0F 15 /wm */ { BxPrefixSSE, BX_IA_UNPCKHPS_VpsWdq, BxOpcodeGroupSSE_0f15 }, - /* 0F 16 /wm */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16 }, + /* 0F 16 /wm */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16M }, /* 0F 17 /wm */ { BxPrefixSSE, BX_IA_MOVHPS_MqVps, BxOpcodeGroupSSE_0f17M }, # if BX_CPU_LEVEL >= 6 /* 0F 18 /wm */ { 0, BX_IA_PREFETCH }, // opcode group G16, PREFETCH hints @@ -2144,7 +2144,7 @@ static const BxOpcodeInfo_t BxOpcodeInfo32M[512*2] = { /* 0F 13 /dm */ { BxPrefixSSE, BX_IA_MOVLPS_MqVps, BxOpcodeGroupSSE_0f13M }, /* 0F 14 /dm */ { BxPrefixSSE, BX_IA_UNPCKLPS_VpsWdq, BxOpcodeGroupSSE_0f14 }, /* 0F 15 /dm */ { BxPrefixSSE, BX_IA_UNPCKHPS_VpsWdq, BxOpcodeGroupSSE_0f15 }, - /* 0F 16 /dm */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16 }, + /* 0F 16 /dm */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16M }, /* 0F 17 /dm */ { BxPrefixSSE, BX_IA_MOVHPS_MqVps, BxOpcodeGroupSSE_0f17M }, # if BX_CPU_LEVEL >= 6 /* 0F 18 /dm */ { 0, BX_IA_PREFETCH }, // opcode group G16, PREFETCH hints diff --git a/bochs/cpu/fetchdecode64.cc b/bochs/cpu/fetchdecode64.cc index 08cbad3f3..63f6ce0f3 100644 --- a/bochs/cpu/fetchdecode64.cc +++ b/bochs/cpu/fetchdecode64.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: fetchdecode64.cc,v 1.257 2010-03-30 15:01:09 sshwarts Exp $ +// $Id: fetchdecode64.cc,v 1.258 2010-03-30 16:39:57 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001-2009 The Bochs Project @@ -439,7 +439,7 @@ static const BxOpcodeInfo_t BxOpcodeInfo64R[512*3] = { /* 0F 13 /wr */ { 0, BX_IA_ERROR }, // MOVLPS/PD SSE group /* 0F 14 /wr */ { BxPrefixSSE, BX_IA_UNPCKLPS_VpsWdq, BxOpcodeGroupSSE_0f14 }, /* 0F 15 /wr */ { BxPrefixSSE, BX_IA_UNPCKHPS_VpsWdq, BxOpcodeGroupSSE_0f15 }, - /* 0F 16 /wr */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16 }, + /* 0F 16 /wr */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16R }, /* 0F 17 /wr */ { 0, BX_IA_ERROR }, // MOHLPS/PD SSE group /* 0F 18 /wr */ { 0, BX_IA_NOP }, // PREFETCH HINT /* 0F 19 /wr */ { 0, BX_IA_NOP }, // multi-byte NOP @@ -958,7 +958,7 @@ static const BxOpcodeInfo_t BxOpcodeInfo64R[512*3] = { /* 0F 13 /dr */ { 0, BX_IA_ERROR }, // MOVLPS/PD SSE group /* 0F 14 /dr */ { BxPrefixSSE, BX_IA_UNPCKLPS_VpsWdq, BxOpcodeGroupSSE_0f14 }, /* 0F 15 /dr */ { BxPrefixSSE, BX_IA_UNPCKHPS_VpsWdq, BxOpcodeGroupSSE_0f15 }, - /* 0F 16 /dr */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16 }, + /* 0F 16 /dr */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16R }, /* 0F 17 /dr */ { 0, BX_IA_ERROR }, // MOHLPS/PD SSE group /* 0F 18 /dr */ { 0, BX_IA_NOP }, // PREFETCH HINT /* 0F 19 /dr */ { 0, BX_IA_NOP }, // multi-byte NOP @@ -1477,7 +1477,7 @@ static const BxOpcodeInfo_t BxOpcodeInfo64R[512*3] = { /* 0F 13 /qr */ { 0, BX_IA_ERROR }, // MOVLPS/PD SSE group /* 0F 14 /qr */ { BxPrefixSSE, BX_IA_UNPCKLPS_VpsWdq, BxOpcodeGroupSSE_0f14 }, /* 0F 15 /qr */ { BxPrefixSSE, BX_IA_UNPCKHPS_VpsWdq, BxOpcodeGroupSSE_0f15 }, - /* 0F 16 /qr */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16 }, + /* 0F 16 /qr */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16R }, /* 0F 17 /qr */ { 0, BX_IA_ERROR }, // MOHLPS/PD SSE group /* 0F 18 /qr */ { 0, BX_IA_NOP }, // PREFETCH HINT /* 0F 19 /qr */ { 0, BX_IA_NOP }, // multi-byte NOP @@ -2002,7 +2002,7 @@ static const BxOpcodeInfo_t BxOpcodeInfo64M[512*3] = { /* 0F 13 /wm */ { BxPrefixSSE, BX_IA_MOVLPS_MqVps, BxOpcodeGroupSSE_0f13M }, /* 0F 14 /wm */ { BxPrefixSSE, BX_IA_UNPCKLPS_VpsWdq, BxOpcodeGroupSSE_0f14 }, /* 0F 15 /wm */ { BxPrefixSSE, BX_IA_UNPCKHPS_VpsWdq, BxOpcodeGroupSSE_0f15 }, - /* 0F 16 /wm */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16 }, + /* 0F 16 /wm */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16M }, /* 0F 17 /wm */ { BxPrefixSSE, BX_IA_MOVHPS_MqVps, BxOpcodeGroupSSE_0f17M }, /* 0F 18 /wm */ { 0, BX_IA_PREFETCH }, // opcode group G16, PREFETCH hints /* 0F 19 /wm */ { 0, BX_IA_NOP }, // multi-byte NOP @@ -2521,7 +2521,7 @@ static const BxOpcodeInfo_t BxOpcodeInfo64M[512*3] = { /* 0F 13 /dm */ { BxPrefixSSE, BX_IA_MOVLPS_MqVps, BxOpcodeGroupSSE_0f13M }, /* 0F 14 /dm */ { BxPrefixSSE, BX_IA_UNPCKLPS_VpsWdq, BxOpcodeGroupSSE_0f14 }, /* 0F 15 /dm */ { BxPrefixSSE, BX_IA_UNPCKHPS_VpsWdq, BxOpcodeGroupSSE_0f15 }, - /* 0F 16 /dm */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16 }, + /* 0F 16 /dm */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16M }, /* 0F 17 /dm */ { BxPrefixSSE, BX_IA_MOVHPS_MqVps, BxOpcodeGroupSSE_0f17M }, /* 0F 18 /dm */ { 0, BX_IA_PREFETCH }, // opcode group G16, PREFETCH hints /* 0F 19 /dm */ { 0, BX_IA_NOP }, // multi-byte NOP @@ -3040,7 +3040,7 @@ static const BxOpcodeInfo_t BxOpcodeInfo64M[512*3] = { /* 0F 13 /qm */ { BxPrefixSSE, BX_IA_MOVLPS_MqVps, BxOpcodeGroupSSE_0f13M }, /* 0F 14 /qm */ { BxPrefixSSE, BX_IA_UNPCKLPS_VpsWdq, BxOpcodeGroupSSE_0f14 }, /* 0F 15 /qm */ { BxPrefixSSE, BX_IA_UNPCKHPS_VpsWdq, BxOpcodeGroupSSE_0f15 }, - /* 0F 16 /qm */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16 }, + /* 0F 16 /qm */ { BxPrefixSSE, BX_IA_MOVHPS_VpsMq, BxOpcodeGroupSSE_0f16M }, /* 0F 17 /qm */ { BxPrefixSSE, BX_IA_MOVHPS_MqVps, BxOpcodeGroupSSE_0f17M }, /* 0F 18 /qm */ { 0, BX_IA_PREFETCH }, // opcode group G16, PREFETCH hints /* 0F 19 /qm */ { 0, BX_IA_NOP }, // multi-byte NOP diff --git a/bochs/cpu/fetchdecode_sse.h b/bochs/cpu/fetchdecode_sse.h index ace2ef010..dd8c24c79 100755 --- a/bochs/cpu/fetchdecode_sse.h +++ b/bochs/cpu/fetchdecode_sse.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: fetchdecode_sse.h,v 1.7 2010-03-30 15:01:09 sshwarts Exp $ +// $Id: fetchdecode_sse.h,v 1.8 2010-03-30 16:39:57 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (c) 2005-2010 Stanislav Shwartsman @@ -88,7 +88,13 @@ static const BxOpcodeInfo_t BxOpcodeGroupSSE_0f15[3] = { /* F3 */ { 0, BX_IA_ERROR } }; -static const BxOpcodeInfo_t BxOpcodeGroupSSE_0f16[3] = { +static const BxOpcodeInfo_t BxOpcodeGroupSSE_0f16R[3] = { + /* 66 */ { 0, BX_IA_ERROR }, + /* F2 */ { 0, BX_IA_ERROR }, + /* F3 */ { 0, BX_IA_MOVSHDUP_VpsWps } // SSE3 +}; + +static const BxOpcodeInfo_t BxOpcodeGroupSSE_0f16M[3] = { /* 66 */ { 0, BX_IA_MOVHPD_VsdMq }, /* F2 */ { 0, BX_IA_ERROR }, /* F3 */ { 0, BX_IA_MOVSHDUP_VpsWps } // SSE3