aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2019-06-05 10:27:08 -0700
committerH.J. Lu <hjl.tools@gmail.com>2019-06-05 10:27:28 -0700
commit12efd68d159444ad8dfe24e49965a228ba980b86 (patch)
tree277ddd7404ff2131da5578b6e4a993372be0e0ed /gas
parent62d8e3b73139b159963025b5568ec1f5051450f0 (diff)
downloadgdb-12efd68d159444ad8dfe24e49965a228ba980b86.zip
gdb-12efd68d159444ad8dfe24e49965a228ba980b86.tar.gz
gdb-12efd68d159444ad8dfe24e49965a228ba980b86.tar.bz2
i386: Check vector length for EVEX vextractfXX and vinsertfXX
Since not all vector lengths are supported by EVEX vextractfXX and vinsertfXX, decode them only with supported vector lengths. gas/ PR binutils/24633 * testsuite/gas/i386/disassem.s: Add tests for invalid vector lengths for EVEX vextractfXX and vinsertfXX. * testsuite/gas/i386/x86-64-disassem.s: Likewise. * testsuite/gas/i386/disassem.d: Updated. * testsuite/gas/i386/x86-64-disassem.d: Likewise. opcodes/ PR binutils/24633 * i386-dis-evex.h (evex_table): Update EVEX_W_0F3A18_P_2, EVEX_W_0F3A19_P_2, EVEX_W_0F3A1A_P_2 and EVEX_W_0F3A1B_P_2. (evex_len_table): EVEX_LEN_0F3A18_P_2_W_0, EVEX_LEN_0F3A18_P_2_W_1, EVEX_LEN_0F3A19_P_2_W_0, EVEX_LEN_0F3A19_P_2_W_1, EVEX_LEN_0F3A1A_P_2_W_0, EVEX_LEN_0F3A1A_P_2_W_1, EVEX_LEN_0F3A1B_P_2_W_0, EVEX_LEN_0F3A1B_P_2_W_1. * i386-dis.c (EVEX_LEN_0F3A18_P_2_W_0): New enum. (EVEX_LEN_0F3A18_P_2_W_1): Likewise. (EVEX_LEN_0F3A19_P_2_W_0): Likewise. (EVEX_LEN_0F3A19_P_2_W_1): Likewise. (EVEX_LEN_0F3A1A_P_2_W_0): Likewise. (EVEX_LEN_0F3A1A_P_2_W_1): Likewise. (EVEX_LEN_0F3A1B_P_2_W_0): Likewise. (EVEX_LEN_0F3A1B_P_2_W_1): Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog9
-rw-r--r--gas/testsuite/gas/i386/disassem.d5
-rw-r--r--gas/testsuite/gas/i386/disassem.s2
-rw-r--r--gas/testsuite/gas/i386/x86-64-disassem.d5
-rw-r--r--gas/testsuite/gas/i386/x86-64-disassem.s2
5 files changed, 21 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 036d734..88bba08 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,12 @@
+2019-06-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/24633
+ * testsuite/gas/i386/disassem.s: Add tests for invalid vector
+ lengths for EVEX vextractfXX and vinsertfXX.
+ * testsuite/gas/i386/x86-64-disassem.s: Likewise.
+ * testsuite/gas/i386/disassem.d: Updated.
+ * testsuite/gas/i386/x86-64-disassem.d: Likewise.
+
2019-06-04 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/24626
diff --git a/gas/testsuite/gas/i386/disassem.d b/gas/testsuite/gas/i386/disassem.d
index ff9ee49..530e3a1 100644
--- a/gas/testsuite/gas/i386/disassem.d
+++ b/gas/testsuite/gas/i386/disassem.d
@@ -345,5 +345,8 @@ Disassembly of section \.text:
[ ]*[a-f0-9]+:[ ]*41[ ]*inc[ ]*%ecx
[ ]*[a-f0-9]+:[ ]*37[ ]*aaa[ ]*
[ ]*[a-f0-9]+:[ ]*62 f2 ad 08 1c[ ]*\(bad\)[ ]*
-[ ]*[a-f0-9]+:[ ]*01[ ]*.byte[ ]*0x1
+[ ]*[a-f0-9]+:[ ]*01 01[ ]*add[ ]*%eax,\(%ecx\)
+[ ]*[a-f0-9]+:[ ]*62 f3 7d 28 1b[ ]*\(bad\)[ ]*
+[ ]*[a-f0-9]+:[ ]*c8[ ]*.byte[ ]*0xc8
+[ ]*[a-f0-9]+:[ ]*25[ ]*.byte[ ]*0x25
#pass
diff --git a/gas/testsuite/gas/i386/disassem.s b/gas/testsuite/gas/i386/disassem.s
index 700208a..00eeb39 100644
--- a/gas/testsuite/gas/i386/disassem.s
+++ b/gas/testsuite/gas/i386/disassem.s
@@ -169,3 +169,5 @@
.byte 0xC4, 0xE1, 0xF9, 0x93, 0x3F
.byte 0xc4, 0xe2, 0x1, 0x1c, 0x41, 0x37
.byte 0x62, 0xf2, 0xad, 0x08, 0x1c, 0x01
+.byte 0x1
+.byte 0x62, 0xf3, 0x7d, 0x28, 0x1b, 0xc8, 0x25
diff --git a/gas/testsuite/gas/i386/x86-64-disassem.d b/gas/testsuite/gas/i386/x86-64-disassem.d
index c8277bf..a7c2c3e 100644
--- a/gas/testsuite/gas/i386/x86-64-disassem.d
+++ b/gas/testsuite/gas/i386/x86-64-disassem.d
@@ -344,5 +344,8 @@ Disassembly of section \.text:
[ ]*[a-f0-9]+:[ ]*c4 62 01 1c[ ]*\(bad\)[ ]*
[ ]*[a-f0-9]+:[ ]*41 37[ ]*rex.B \(bad\)[ ]*
[ ]*[a-f0-9]+:[ ]*62 72 ad 08 1c[ ]*\(bad\)[ ]*
-[ ]*[a-f0-9]+:[ ]*01[ ]*.byte[ ]*0x1
+[ ]*[a-f0-9]+:[ ]*01 01[ ]*add[ ]*%eax,\(%rcx\)
+[ ]*[a-f0-9]+:[ ]*62 f3 7d 28 1b[ ]*\(bad\)[ ]*
+[ ]*[a-f0-9]+:[ ]*c8[ ]*.byte[ ]*0xc8
+[ ]*[a-f0-9]+:[ ]*25[ ]*.byte[ ]*0x25
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-disassem.s b/gas/testsuite/gas/i386/x86-64-disassem.s
index ade5e15..ef4e87d 100644
--- a/gas/testsuite/gas/i386/x86-64-disassem.s
+++ b/gas/testsuite/gas/i386/x86-64-disassem.s
@@ -169,3 +169,5 @@
.byte 0xC4, 0xE1, 0xF9, 0x93, 0x3F
.byte 0xc4, 0x62, 0x1, 0x1c, 0x41, 0x37
.byte 0x62, 0x72, 0xad, 0x08, 0x1c, 0x01
+.byte 0x1
+.byte 0x62, 0xf3, 0x7d, 0x28, 0x1b, 0xc8, 0x25