aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/testsuite/gas/i386/evex.d4
-rw-r--r--opcodes/ChangeLog9
-rw-r--r--opcodes/i386-dis-evex.h4
-rw-r--r--opcodes/i386-dis.c11
5 files changed, 29 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 52346d7..7b24076 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,6 +1,11 @@
2018-09-14 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/23655
+ * testsuite/gas/i386/evex.d: Updated.
+
+2018-09-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/23655
* testsuite/gas/i386/evex.d: New file.
* testsuite/gas/i386/evex.s: Likewise.
* testsuite/gas/i386/i386.exp: Run evex.
diff --git a/gas/testsuite/gas/i386/evex.d b/gas/testsuite/gas/i386/evex.d
index ffbcdc1..2fbe295 100644
--- a/gas/testsuite/gas/i386/evex.d
+++ b/gas/testsuite/gas/i386/evex.d
@@ -8,9 +8,9 @@ Disassembly of section .text:
0+ <_start>:
+[a-f0-9]+: 62 f1 d6 38 2a f0 vcvtsi2ssl %eax,\{rd-sae\},%xmm5,%xmm6
- +[a-f0-9]+: 62 f1 d7 38 2a f0 vcvtsi2sdl %eax,\{rd-sae\},%xmm5,%xmm6
+ +[a-f0-9]+: 62 f1 d7 38 2a f0 vcvtsi2sdl %eax,\(bad\),%xmm5,%xmm6
+[a-f0-9]+: 62 f1 d6 08 7b f0 vcvtusi2ssl %eax,%xmm5,%xmm6
+[a-f0-9]+: 62 f1 d7 08 7b f0 vcvtusi2sdl %eax,%xmm5,%xmm6
+[a-f0-9]+: 62 f1 d6 38 7b f0 vcvtusi2ssl %eax,\{rd-sae\},%xmm5,%xmm6
- +[a-f0-9]+: 62 f1 d7 38 7b f0 vcvtusi2sdl %eax,\{rd-sae\},%xmm5,%xmm6
+ +[a-f0-9]+: 62 f1 d7 38 7b f0 vcvtusi2sdl %eax,\(bad\),%xmm5,%xmm6
#pass
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 7def411..571aa6c 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,6 +1,15 @@
2018-09-14 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/23655
+ * i386-dis-evex.h: Replace EXxEVexR with EXxEVexR64 for
+ vcvtsi2sd%LQ and vcvtusi2sd%LQ.
+ * i386-dis.c (EXxEVexR64): New.
+ (evex_rounding_64_mode): Likewise.
+ (OP_Rounding): Handle evex_rounding_64_mode.
+
+2018-09-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/23655
* i386-dis-evex.h (evex_table): Replace Eq with Edqa for
vcvtsi2ss%LQ, vcvtsi2sd%LQ, vcvtusi2ss%LQ and vcvtusi2sd%LQ.
* i386-dis.c (Edqa): New.
diff --git a/opcodes/i386-dis-evex.h b/opcodes/i386-dis-evex.h
index f59c7cc..932f10a 100644
--- a/opcodes/i386-dis-evex.h
+++ b/opcodes/i386-dis-evex.h
@@ -3051,7 +3051,7 @@ static const struct dis386 evex_table[][256] = {
/* EVEX_W_0F2A_P_3 */
{
{ "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ed }, 0 },
- { "vcvtsi2sd%LQ", { XMScalar, VexScalar, EXxEVexR, Edqa }, 0 },
+ { "vcvtsi2sd%LQ", { XMScalar, VexScalar, EXxEVexR64, Edqa }, 0 },
},
/* EVEX_W_0F2B_P_0 */
{
@@ -3393,7 +3393,7 @@ static const struct dis386 evex_table[][256] = {
/* EVEX_W_0F7B_P_3 */
{
{ "vcvtusi2sd%LQ", { XMScalar, VexScalar, Ed }, 0 },
- { "vcvtusi2sd%LQ", { XMScalar, VexScalar, EXxEVexR, Edqa }, 0 },
+ { "vcvtusi2sd%LQ", { XMScalar, VexScalar, EXxEVexR64, Edqa }, 0 },
},
/* EVEX_W_0F7E_P_1 */
{
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 83c6107..9453e52 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -448,6 +448,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#define VPCOM { VPCOM_Fixup, 0 }
#define EXxEVexR { OP_Rounding, evex_rounding_mode }
+#define EXxEVexR64 { OP_Rounding, evex_rounding_64_mode }
#define EXxEVexS { OP_Rounding, evex_sae_mode }
#define XMask { OP_Mask, mask_mode }
@@ -633,6 +634,8 @@ enum
/* Static rounding. */
evex_rounding_mode,
+ /* Static rounding, 64-bit mode only. */
+ evex_rounding_64_mode,
/* Supress all exceptions. */
evex_sae_mode,
@@ -17950,11 +17953,19 @@ OP_Rounding (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
{
if (!vex.evex
|| (bytemode != evex_rounding_mode
+ && bytemode != evex_rounding_64_mode
&& bytemode != evex_sae_mode))
abort ();
if (modrm.mod == 3 && vex.b)
switch (bytemode)
{
+ case evex_rounding_64_mode:
+ if (address_mode != mode_64bit)
+ {
+ oappend ("(bad)");
+ break;
+ }
+ /* Fall through. */
case evex_rounding_mode:
oappend (names_rounding[vex.ll]);
break;