aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-dis.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2018-11-06 11:44:31 +0100
committerJan Beulich <jbeulich@suse.com>2018-11-06 11:44:31 +0100
commit58a211d2602df0a39779c84a344b1b4d12deb2d0 (patch)
tree03e169e34b28bf06b8152e3364fcc21fc74a22f4 /opcodes/i386-dis.c
parentb50c9f31661be05bcd73fb1158e02f606e696948 (diff)
downloadgdb-58a211d2602df0a39779c84a344b1b4d12deb2d0.zip
gdb-58a211d2602df0a39779c84a344b1b4d12deb2d0.tar.gz
gdb-58a211d2602df0a39779c84a344b1b4d12deb2d0.tar.bz2
x86: correctly handle KMOVD with VEX.W set outside of 64-bit mode
For the flavors having a GPR operand VEX.W is ignored outside of 64-bit mode. The mnemonic should therefore not be KMOVQ.
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r--opcodes/i386-dis.c40
1 files changed, 8 insertions, 32 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 82c5785..f3fbf19 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -903,12 +903,10 @@ enum
MOD_VEX_W_1_0F91_P_2_LEN_0,
MOD_VEX_W_0_0F92_P_0_LEN_0,
MOD_VEX_W_0_0F92_P_2_LEN_0,
- MOD_VEX_W_0_0F92_P_3_LEN_0,
- MOD_VEX_W_1_0F92_P_3_LEN_0,
+ MOD_VEX_0F92_P_3_LEN_0,
MOD_VEX_W_0_0F93_P_0_LEN_0,
MOD_VEX_W_0_0F93_P_2_LEN_0,
- MOD_VEX_W_0_0F93_P_3_LEN_0,
- MOD_VEX_W_1_0F93_P_3_LEN_0,
+ MOD_VEX_0F93_P_3_LEN_0,
MOD_VEX_W_0_0F98_P_0_LEN_0,
MOD_VEX_W_1_0F98_P_0_LEN_0,
MOD_VEX_W_0_0F98_P_2_LEN_0,
@@ -1963,10 +1961,8 @@ enum
VEX_W_0F91_P_2_LEN_0,
VEX_W_0F92_P_0_LEN_0,
VEX_W_0F92_P_2_LEN_0,
- VEX_W_0F92_P_3_LEN_0,
VEX_W_0F93_P_0_LEN_0,
VEX_W_0F93_P_2_LEN_0,
- VEX_W_0F93_P_3_LEN_0,
VEX_W_0F98_P_0_LEN_0,
VEX_W_0F98_P_2_LEN_0,
VEX_W_0F99_P_0_LEN_0,
@@ -9486,7 +9482,7 @@ static const struct dis386 vex_len_table[][2] = {
/* VEX_LEN_0F92_P_3 */
{
- { VEX_W_TABLE (VEX_W_0F92_P_3_LEN_0) },
+ { MOD_TABLE (MOD_VEX_0F92_P_3_LEN_0) },
},
/* VEX_LEN_0F93_P_0 */
@@ -9501,7 +9497,7 @@ static const struct dis386 vex_len_table[][2] = {
/* VEX_LEN_0F93_P_3 */
{
- { VEX_W_TABLE (VEX_W_0F93_P_3_LEN_0) },
+ { MOD_TABLE (MOD_VEX_0F93_P_3_LEN_0) },
},
/* VEX_LEN_0F98_P_0 */
@@ -10000,11 +9996,6 @@ static const struct dis386 vex_w_table[][2] = {
{ MOD_TABLE (MOD_VEX_W_0_0F92_P_2_LEN_0) },
},
{
- /* VEX_W_0F92_P_3_LEN_0 */
- { MOD_TABLE (MOD_VEX_W_0_0F92_P_3_LEN_0) },
- { MOD_TABLE (MOD_VEX_W_1_0F92_P_3_LEN_0) },
- },
- {
/* VEX_W_0F93_P_0_LEN_0 */
{ MOD_TABLE (MOD_VEX_W_0_0F93_P_0_LEN_0) },
},
@@ -10013,11 +10004,6 @@ static const struct dis386 vex_w_table[][2] = {
{ MOD_TABLE (MOD_VEX_W_0_0F93_P_2_LEN_0) },
},
{
- /* VEX_W_0F93_P_3_LEN_0 */
- { MOD_TABLE (MOD_VEX_W_0_0F93_P_3_LEN_0) },
- { MOD_TABLE (MOD_VEX_W_1_0F93_P_3_LEN_0) },
- },
- {
/* VEX_W_0F98_P_0_LEN_0 */
{ MOD_TABLE (MOD_VEX_W_0_0F98_P_0_LEN_0) },
{ MOD_TABLE (MOD_VEX_W_1_0F98_P_0_LEN_0) },
@@ -10818,14 +10804,9 @@ static const struct dis386 mod_table[][2] = {
{ "kmovb", { MaskG, Rdq }, 0 },
},
{
- /* MOD_VEX_W_0_0F92_P_3_LEN_0 */
- { Bad_Opcode },
- { "kmovd", { MaskG, Rdq }, 0 },
- },
- {
- /* MOD_VEX_W_1_0F92_P_3_LEN_0 */
+ /* MOD_VEX_0F92_P_3_LEN_0 */
{ Bad_Opcode },
- { "kmovq", { MaskG, Rdq }, 0 },
+ { "kmovK", { MaskG, Rdq }, 0 },
},
{
/* MOD_VEX_W_0_0F93_P_0_LEN_0 */
@@ -10838,14 +10819,9 @@ static const struct dis386 mod_table[][2] = {
{ "kmovb", { Gdq, MaskR }, 0 },
},
{
- /* MOD_VEX_W_0_0F93_P_3_LEN_0 */
- { Bad_Opcode },
- { "kmovd", { Gdq, MaskR }, 0 },
- },
- {
- /* MOD_VEX_W_1_0F93_P_3_LEN_0 */
+ /* MOD_VEX_0F93_P_3_LEN_0 */
{ Bad_Opcode },
- { "kmovq", { Gdq, MaskR }, 0 },
+ { "kmovK", { Gdq, MaskR }, 0 },
},
{
/* MOD_VEX_W_0_0F98_P_0_LEN_0 */