aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2018-03-22 08:29:45 +0100
committerJan Beulich <jbeulich@suse.com>2018-03-22 08:29:45 +0100
commitf776822506b417ce25170c67c33cc05870b37adf (patch)
treeb744c766b506332337293f2aa1fe9684dbe19db5 /gas
parent5d9310c4b88f807c1a3f1a0b4d7b6c10925dcaf7 (diff)
downloadgdb-f776822506b417ce25170c67c33cc05870b37adf.zip
gdb-f776822506b417ce25170c67c33cc05870b37adf.tar.gz
gdb-f776822506b417ce25170c67c33cc05870b37adf.tar.bz2
x86: fold a few XOP templates
Also add a new test case verifying that mixed operands of SIMD insns with a size-less memory operand in the middle are properly rejected.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-i386.c12
-rw-r--r--gas/testsuite/gas/i386/i386.exp1
-rw-r--r--gas/testsuite/gas/i386/unspec.l65
-rw-r--r--gas/testsuite/gas/i386/unspec.s69
5 files changed, 150 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index fb7ddec..1e0ebb2 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2018-03-22 Jan Beulich <jbeulich@suse.com>
+
+ * config/tc-i386.c (match_template): Also match 2nd and 4th
+ operand's register sizes.
+ * testsuite/gas/i386/unspec.l, testsuite/gas/i386/unspec.s: New.
+ * testsuite/gas/i386/i386.exp: Run new test.
+
2018-03-19 Nick Clifton <nickc@redhat.com>
* po/uk.po: Updated Ukranian translation.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index e94e01c..01365f3 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -5510,10 +5510,14 @@ check_reverse:
case 4:
if (!operand_type_match (overlap3, i.types[3])
|| (check_register
- && !operand_type_register_match (i.types[2],
- operand_types[2],
- i.types[3],
- operand_types[3])))
+ && (!operand_type_register_match (i.types[1],
+ operand_types[1],
+ i.types[3],
+ operand_types[3])
+ || !operand_type_register_match (i.types[2],
+ operand_types[2],
+ i.types[3],
+ operand_types[3]))))
continue;
/* Fall through. */
case 3:
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index fd87562..2fbb52b 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -556,6 +556,7 @@ if [expr [istarget "i*86-*-*"] || [istarget "x86_64-*-*"]] then {
run_dump_test rept
run_dump_test pr19498
run_list_test "nop-bad-1" ""
+ run_list_test "unspec" ""
if [is_elf_format] then {
run_list_test_stdin "list-1" "-al"
run_list_test_stdin "list-2" "-al"
diff --git a/gas/testsuite/gas/i386/unspec.l b/gas/testsuite/gas/i386/unspec.l
new file mode 100644
index 0000000..0b08ad3
--- /dev/null
+++ b/gas/testsuite/gas/i386/unspec.l
@@ -0,0 +1,65 @@
+.*: Assembler messages:
+.*:3: Error: .*vblendvpd.*
+.*:4: Error: .*vblendvpd.*
+.*:5: Error: .*vblendvps.*
+.*:6: Error: .*vblendvps.*
+.*:7: Error: .*vfmaddpd.*
+.*:8: Error: .*vfmaddpd.*
+.*:9: Error: .*vfmaddps.*
+.*:10: Error: .*vfmaddps.*
+.*:11: Error: .*vgatherdpd.*
+.*:12: Error: .*vgatherdpd.*
+.*:13: Error: .*vgatherdps.*
+.*:14: Error: .*vgatherdps.*
+.*:15: Error: .*vgatherqpd.*
+.*:16: Error: .*vgatherqpd.*
+.*:17: Error: .*vgatherqps.*
+.*:18: Error: .*vgatherqps.*
+.*:19: Error: .*vpblendvb.*
+.*:20: Error: .*vpblendvb.*
+.*:21: Error: .*vpcmov.*
+.*:22: Error: .*vpcmov.*
+.*:23: Error: .*vpermil2pd.*
+.*:24: Error: .*vpermil2pd.*
+.*:25: Error: .*vpermil2ps.*
+.*:26: Error: .*vpermil2ps.*
+.*:27: Error: .*vpgatherdd.*
+.*:28: Error: .*vpgatherdd.*
+.*:29: Error: .*vpgatherdq.*
+.*:30: Error: .*vpgatherdq.*
+.*:31: Error: .*vpgatherqd.*
+.*:32: Error: .*vpgatherqd.*
+.*:33: Error: .*vpgatherqq.*
+.*:34: Error: .*vpgatherqq.*
+.*:38: Error: .*vblendvpd.*
+.*:39: Error: .*vblendvpd.*
+.*:40: Error: .*vblendvps.*
+.*:41: Error: .*vblendvps.*
+.*:42: Error: .*vfmaddpd.*
+.*:43: Error: .*vfmaddpd.*
+.*:44: Error: .*vfmaddps.*
+.*:45: Error: .*vfmaddps.*
+.*:46: Error: .*vgatherdpd.*
+.*:47: Error: .*vgatherdpd.*
+.*:48: Error: .*vgatherdps.*
+.*:49: Error: .*vgatherdps.*
+.*:50: Error: .*vgatherqpd.*
+.*:51: Error: .*vgatherqpd.*
+.*:52: Error: .*vgatherqps.*
+.*:53: Error: .*vgatherqps.*
+.*:54: Error: .*vpblendvb.*
+.*:55: Error: .*vpblendvb.*
+.*:56: Error: .*vpcmov.*
+.*:57: Error: .*vpcmov.*
+.*:58: Error: .*vpermil2pd.*
+.*:59: Error: .*vpermil2pd.*
+.*:60: Error: .*vpermil2ps.*
+.*:61: Error: .*vpermil2ps.*
+.*:62: Error: .*vpgatherdd.*
+.*:63: Error: .*vpgatherdd.*
+.*:64: Error: .*vpgatherdq.*
+.*:65: Error: .*vpgatherdq.*
+.*:66: Error: .*vpgatherqd.*
+.*:67: Error: .*vpgatherqd.*
+.*:68: Error: .*vpgatherqq.*
+.*:69: Error: .*vpgatherqq.*
diff --git a/gas/testsuite/gas/i386/unspec.s b/gas/testsuite/gas/i386/unspec.s
new file mode 100644
index 0000000..9b02670
--- /dev/null
+++ b/gas/testsuite/gas/i386/unspec.s
@@ -0,0 +1,69 @@
+ .text
+unspec:
+ vblendvpd %xmm0, (%eax), %ymm0, %ymm0
+ vblendvpd %ymm0, (%eax), %xmm0, %xmm0
+ vblendvps %xmm0, (%eax), %ymm0, %ymm0
+ vblendvps %ymm0, (%eax), %xmm0, %xmm0
+ vfmaddpd %xmm0, (%eax), %ymm0, %ymm0
+ vfmaddpd %ymm0, (%eax), %xmm0, %xmm0
+ vfmaddps %xmm0, (%eax), %ymm0, %ymm0
+ vfmaddps %ymm0, (%eax), %xmm0, %xmm0
+ vgatherdpd %xmm0, (%eax,%xmm1), %ymm2
+ vgatherdpd %ymm0, (%eax,%xmm1), %xmm2
+ vgatherdps %xmm0, (%eax,%xmm1), %ymm2
+ vgatherdps %ymm0, (%eax,%ymm1), %xmm2
+ vgatherqpd %xmm0, (%eax,%xmm1), %ymm2
+ vgatherqpd %ymm0, (%eax,%ymm1), %xmm2
+ vgatherqps %xmm0, (%eax,%xmm1), %ymm2
+ vgatherqps %xmm0, (%eax,%ymm1), %ymm2
+ vpblendvb %xmm0, (%eax), %ymm0, %ymm0
+ vpblendvb %ymm0, (%eax), %xmm0, %xmm0
+ vpcmov %xmm0, (%eax), %ymm0, %ymm0
+ vpcmov %ymm0, (%eax), %xmm0, %xmm0
+ vpermil2pd $0, %xmm0, (%eax), %ymm0, %ymm0
+ vpermil2pd $0, %ymm0, (%eax), %xmm0, %xmm0
+ vpermil2ps $0, %xmm0, (%eax), %ymm0, %ymm0
+ vpermil2ps $0, %ymm0, (%eax), %xmm0, %xmm0
+ vpgatherdd %xmm0, (%eax,%xmm1), %ymm2
+ vpgatherdd %ymm0, (%eax,%ymm1), %xmm2
+ vpgatherdq %xmm0, (%eax,%xmm1), %ymm2
+ vpgatherdq %ymm0, (%eax,%xmm1), %xmm2
+ vpgatherqd %xmm0, (%eax,%xmm1), %ymm2
+ vpgatherqd %xmm0, (%eax,%ymm1), %ymm2
+ vpgatherqq %xmm0, (%eax,%xmm1), %ymm2
+ vpgatherqq %ymm0, (%eax,%ymm1), %xmm2
+
+ .intel_syntax noprefix
+
+ vblendvpd xmm0, xmm0, [eax], ymm0
+ vblendvpd ymm0, ymm0, [eax], xmm0
+ vblendvps xmm0, xmm0, [eax], ymm0
+ vblendvps ymm0, ymm0, [eax], xmm0
+ vfmaddpd xmm0, xmm0, [eax], ymm0
+ vfmaddpd ymm0, ymm0, [eax], xmm0
+ vfmaddps xmm0, xmm0, [eax], ymm0
+ vfmaddps ymm0, ymm0, [eax], xmm0
+ vgatherdpd xmm0, [eax+xmm1], ymm2
+ vgatherdpd ymm0, [eax+xmm1], xmm2
+ vgatherdps xmm0, [eax+xmm1], ymm2
+ vgatherdps ymm0, [eax+ymm1], xmm2
+ vgatherqpd xmm0, [eax+xmm1], ymm2
+ vgatherqpd ymm0, [eax+ymm1], xmm2
+ vgatherqps xmm0, [eax+xmm1], ymm2
+ vgatherqps xmm0, [eax+ymm1], ymm2
+ vpblendvb xmm0, xmm0, [eax], ymm0
+ vpblendvb ymm0, ymm0, [eax], xmm0
+ vpcmov xmm0, xmm0, [eax], ymm0
+ vpcmov ymm0, ymm0, [eax], xmm0
+ vpermil2pd xmm0, xmm0, [eax], ymm0, 0
+ vpermil2pd ymm0, ymm0, [eax], xmm0, 0
+ vpermil2ps xmm0, xmm0, [eax], ymm0, 0
+ vpermil2ps ymm0, ymm0, [eax], xmm0, 0
+ vpgatherdd xmm0, [eax+xmm1], ymm2
+ vpgatherdd ymm0, [eax+ymm1], xmm2
+ vpgatherdq xmm0, [eax+xmm1], ymm2
+ vpgatherdq ymm0, [eax+xmm1], xmm2
+ vpgatherqd xmm0, [eax+xmm1], ymm2
+ vpgatherqd xmm0, [eax+ymm1], ymm2
+ vpgatherqq xmm0, [eax+xmm1], ymm2
+ vpgatherqq ymm0, [eax+ymm1], xmm2