aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMichael Zolotukhin <michael.v.zolotukhin@gmail.com>2014-01-31 08:13:06 -0800
committerH.J. Lu <hjl.tools@gmail.com>2014-01-31 08:13:06 -0800
commit83861ea6d62762bf11482f12558516637bf270ac (patch)
tree83b985f468500b19058ed0f38fc75dc02a5d6d27 /gas
parentae56bfb8e7678409d1ea3603f63a40b01b764dc8 (diff)
downloadgdb-83861ea6d62762bf11482f12558516637bf270ac.zip
gdb-83861ea6d62762bf11482f12558516637bf270ac.tar.gz
gdb-83861ea6d62762bf11482f12558516637bf270ac.tar.bz2
Add gather/scatter tests with incorrect memory operand
2014-01-31 Michael Zolotukhin <michael.v.zolotukhin@gmail.com> PR gas/16488 * gas/i386/inval-avx512f.s: Add test for incorrect memory operand for gather/scatter instructions. * gas/i386/x86-64-inval-avx512f.s: Likewise. * gas/i386/inval-avx512f.l: Adjust correspondingly. * gas/i386/x86-64-inval-avx512f.l: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog9
-rw-r--r--gas/testsuite/gas/i386/inval-avx512f.l115
-rw-r--r--gas/testsuite/gas/i386/inval-avx512f.s9
-rw-r--r--gas/testsuite/gas/i386/x86-64-inval-avx512f.l107
-rw-r--r--gas/testsuite/gas/i386/x86-64-inval-avx512f.s11
5 files changed, 158 insertions, 93 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index c45f647..4941ba3 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2014-01-31 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
+
+ PR gas/16488
+ * gas/i386/inval-avx512f.s: Add test for incorrect memory operand
+ for gather/scatter instructions.
+ * gas/i386/x86-64-inval-avx512f.s: Likewise.
+ * gas/i386/inval-avx512f.l: Adjust correspondingly.
+ * gas/i386/x86-64-inval-avx512f.l: Likewise.
+
2014-01-30 Sandra Loosemore <sandra@codesourcery.com>
* gas/nios2/call26_noat.d: New.
diff --git a/gas/testsuite/gas/i386/inval-avx512f.l b/gas/testsuite/gas/i386/inval-avx512f.l
index 6c525f0..b49a1d5 100644
--- a/gas/testsuite/gas/i386/inval-avx512f.l
+++ b/gas/testsuite/gas/i386/inval-avx512f.l
@@ -1,77 +1,94 @@
.*: Assembler messages:
-.*:4: Error: .*
.*:5: Error: .*
.*:6: Error: .*
.*:7: Error: .*
.*:8: Error: .*
.*:9: Error: .*
-.*:11: Error: .*
+.*:10: Error: .*
.*:12: Error: .*
-.*:14: Error: .*
+.*:13: Error: .*
.*:15: Error: .*
-.*:17: Error: .*
+.*:16: Error: .*
+.*:18: Error: .*
+.*:19: Error: .*
.*:20: Error: .*
.*:21: Error: .*
.*:22: Error: .*
-.*:23: Error: .*
-.*:23: Error: .*
-.*:24: Error: .*
-.*:24: Error: .*
-.*:25: Error: .*
.*:25: Error: .*
+.*:26: Error: .*
.*:27: Error: .*
.*:28: Error: .*
+.*:28: Error: .*
+.*:29: Error: .*
+.*:29: Error: .*
+.*:30: Error: .*
.*:30: Error: .*
-.*:31: Error: .*
+.*:32: Error: .*
.*:33: Error: .*
.*:35: Error: .*
.*:36: Error: .*
-.*:37: Error: .*
.*:38: Error: .*
.*:39: Error: .*
.*:40: Error: .*
.*:41: Error: .*
+.*:42: Error: .*
+.*:44: Error: .*
+.*:45: Error: .*
+.*:46: Error: .*
+.*:47: Error: .*
+.*:48: Error: .*
+.*:49: Error: .*
+.*:50: Error: .*
GAS LISTING .*
[ ]*1[ ]+# Check illegal AVX512F instructions
[ ]*2[ ]+\.text
-[ ]*3[ ]+_start:
-[ ]*4[ ]+mov \{sae\}, %eax\{%k1\}
-[ ]*5[ ]+mov \{sae\}, %eax
-[ ]*6[ ]+mov %ebx, %eax\{%k2\}
-[ ]*7[ ]+vaddps %zmm3, %zmm1, %zmm2\{z\}\{%k1\}\{z\}
-[ ]*8[ ]+vaddps %zmm3, %zmm1\{%k3\}, %zm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+vaddps %zmm3, %zmm1\{%k1\}, %zmm2\{%k2\}
+[ ]*11[ ]+
+[ ]*12[ ]+vcvtps2pd \(%eax\), %zmm1\{1to8\}
+[ ]*13[ ]+vcvtps2pd \(%eax\)\{1to16\}, %zmm1
+[ ]*14[ ]+
+[ ]*15[ ]+vcvtps2pd \(%eax\)\{%k1\}, %zmm1
+[ ]*16[ ]+vcvtps2pd \(%eax\)\{z\}, %zmm1
+[ ]*17[ ]+
+[ ]*18[ ]+vgatherqpd \(%rdi,%zmm2,8\),%zmm6
+[ ]*19[ ]+vgatherqpd \(%edi\),%zmm6\{%k1\}
+[ ]*20[ ]+vgatherqpd \(%zmm2\),%zmm6\{%k1\}
+[ ]*21[ ]+vpscatterdd %zmm6,\(%edi\)\{%k1\}
+[ ]*22[ ]+vpscatterdd %zmm6,\(%zmm2\)\{%k1\}
+[ ]*23[ ]+
+[ ]*24[ ]+\.intel_syntax noprefix
+[ ]*25[ ]+mov eax\{k1\}, \{sae\}
+[ ]*26[ ]+mov eax, \{sae\}
+[ ]*27[ ]+mov eax\{k2\}, ebx
+[ ]*28[ ]+vaddps zmm2\{z\}\{k1\}\{z\}, zmm1, zmm3
+[ ]*29[ ]+vaddps zmm2\{z\}, zmm1\{k3\}, zmm3
+[ ]*30[ ]+vaddps zmm2\{k2\}, zmm1\{k1\}, zmm3
+[ ]*31[ ]+
+[ ]*32[ ]+vcvtps2pd zmm1\{1to8\}, \[eax\]
+[ ]*33[ ]+vcvtps2pd zmm1, \[eax\]\{1to16\}
[ ]*34[ ]+
-[ ]*35[ ]+vaddps zmm2, zmm1, QWORD PTR \[eax\]\{1to8\}
-[ ]*36[ ]+vaddps zmm2, zmm1, QWORD PTR \[eax\]\{1to16\}
-[ ]*37[ ]+vaddpd zmm2, zmm1, DWORD PTR \[eax\]\{1to8\}
-[ ]*38[ ]+vaddpd zmm2, zmm1, DWORD PTR \[eax\]\{1to16\}
-[ ]*39[ ]+vaddps zmm2, zmm1, ZMMWORD PTR \[eax\]\{1to16\}
-[ ]*40[ ]+vaddps zmm2, zmm1, DWORD PTR \[eax\]
-[ ]*41[ ]+vaddpd zmm2, zmm1, QWORD PTR \[eax\]
+[ ]*35[ ]+vcvtps2pd zmm1, \[eax\]\{k1\}
+[ ]*36[ ]+vcvtps2pd zmm1, \[eax\]\{z\}
+[ ]*37[ ]+
+[ ]*38[ ]+vgatherqpd zmm6, ZMMWORD PTR \[rdi\+zmm2\*8\]
+[ ]*39[ ]+vgatherqpd zmm6\{k1\}, ZMMWORD PTR \[edi\]
+[ ]*40[ ]+vgatherqpd zmm6\{k1\}, ZMMWORD PTR \[zmm2\+eiz\]
+[ ]*41[ ]+vpscatterdd ZMMWORD PTR \[edi\]\{k1\}, zmm6
+[ ]*42[ ]+vpscatterdd ZMMWORD PTR \[zmm2\+eiz\]\{k1\}, zmm6
+[ ]*43[ ]+
+[ ]*44[ ]+vaddps zmm2, zmm1, QWORD PTR \[eax\]\{1to8\}
+[ ]*45[ ]+vaddps zmm2, zmm1, QWORD PTR \[eax\]\{1to16\}
+[ ]*46[ ]+vaddpd zmm2, zmm1, DWORD PTR \[eax\]\{1to8\}
+[ ]*47[ ]+vaddpd zmm2, zmm1, DWORD PTR \[eax\]\{1to16\}
+[ ]*48[ ]+vaddps zmm2, zmm1, ZMMWORD PTR \[eax\]\{1to16\}
+[ ]*49[ ]+vaddps zmm2, zmm1, DWORD PTR \[eax\]
+[ ]*50[ ]+vaddpd zmm2, zmm1, QWORD PTR \[eax\]
diff --git a/gas/testsuite/gas/i386/inval-avx512f.s b/gas/testsuite/gas/i386/inval-avx512f.s
index b1ddba4..f723c5a 100644
--- a/gas/testsuite/gas/i386/inval-avx512f.s
+++ b/gas/testsuite/gas/i386/inval-avx512f.s
@@ -1,5 +1,6 @@
# Check illegal AVX512F instructions
.text
+ .allow_index_reg
_start:
mov {sae}, %eax{%k1}
mov {sae}, %eax
@@ -15,6 +16,10 @@ _start:
vcvtps2pd (%eax){z}, %zmm1
vgatherqpd (%rdi,%zmm2,8),%zmm6
+ vgatherqpd (%edi),%zmm6{%k1}
+ vgatherqpd (%zmm2),%zmm6{%k1}
+ vpscatterdd %zmm6,(%edi){%k1}
+ vpscatterdd %zmm6,(%zmm2){%k1}
.intel_syntax noprefix
mov eax{k1}, {sae}
@@ -31,6 +36,10 @@ _start:
vcvtps2pd zmm1, [eax]{z}
vgatherqpd zmm6, ZMMWORD PTR [rdi+zmm2*8]
+ vgatherqpd zmm6{k1}, ZMMWORD PTR [edi]
+ vgatherqpd zmm6{k1}, ZMMWORD PTR [zmm2+eiz]
+ vpscatterdd ZMMWORD PTR [edi]{k1}, zmm6
+ vpscatterdd ZMMWORD PTR [zmm2+eiz]{k1}, zmm6
vaddps zmm2, zmm1, QWORD PTR [eax]{1to8}
vaddps zmm2, zmm1, QWORD PTR [eax]{1to16}
diff --git a/gas/testsuite/gas/i386/x86-64-inval-avx512f.l b/gas/testsuite/gas/i386/x86-64-inval-avx512f.l
index 436acb0..21c4906 100644
--- a/gas/testsuite/gas/i386/x86-64-inval-avx512f.l
+++ b/gas/testsuite/gas/i386/x86-64-inval-avx512f.l
@@ -1,71 +1,90 @@
.*: Assembler messages:
-.*:4: Error: .*
.*:5: Error: .*
.*:6: Error: .*
.*:7: Error: .*
.*:8: Error: .*
.*:9: Error: .*
-.*:11: Error: .*
+.*:10: Error: .*
.*:12: Error: .*
-.*:14: Error: .*
+.*:13: Error: .*
.*:15: Error: .*
+.*:16: Error: .*
.*:18: Error: .*
.*:19: Error: .*
.*:20: Error: .*
.*:21: Error: .*
-.*:21: Error: .*
-.*:22: Error: .*
-.*:22: Error: .*
-.*:23: Error: .*
-.*:23: Error: .*
+.*:24: Error: .*
.*:25: Error: .*
.*:26: Error: .*
+.*:27: Error: .*
+.*:27: Error: .*
+.*:28: Error: .*
.*:28: Error: .*
.*:29: Error: .*
+.*:29: Error: .*
.*:31: Error: .*
.*:32: Error: .*
-.*:33: Error: .*
.*:34: Error: .*
.*:35: Error: .*
-.*:36: Error: .*
.*:37: Error: .*
+.*:38: Error: .*
+.*:39: Error: .*
+.*:40: Error: .*
+.*:42: Error: .*
+.*:43: Error: .*
+.*:44: Error: .*
+.*:45: Error: .*
+.*:46: Error: .*
+.*:47: Error: .*
+.*:48: Error: .*
GAS LISTING .*
[ ]*1[ ]+# Check illegal AVX512F instructions
[ ]*2[ ]+\.text
-[ ]*3[ ]+_start:
-[ ]*4[ ]+mov \{sae\}, %rax\{%k1\}
-[ ]*5[ ]+mov \{sae\}, %rax
-[ ]*6[ ]+mov %rbx, %rax\{%k2\}
-[ ]*7[ ]+vaddps %zmm3, %zmm1, %zmm2\{z\}\{%k1\}\{z\}
-[ ]*8[ ]+vaddps %zmm3, %zmm1\{%k3\}, %zmm2\{z\}
-[ ]*9[ ]+vaddps %zmm3, %zmm1\{%k1\}, %zmm2\{%k2\}
-[ ]*10[ ]+
-[ ]*11[ ]+vcvtps2pd \(%rax\), %zmm1\{1to8\}
-[ ]*12[ ]+vcvtps2pd \(%rax\)\{1to16\}, %zmm1
-[ ]*13[ ]+
-[ ]*14[ ]+vcvtps2pd \(%rax\)\{%k1\}, %zmm1
-[ ]*15[ ]+vcvtps2pd \(%rax\)\{z\}, %zmm1
-[ ]*16[ ]+
-[ ]*17[ ]+\.intel_syntax noprefix
-[ ]*18[ ]+mov rax\{k1\}, \{sae\}
-[ ]*19[ ]+mov rax, \{sae\}
-[ ]*20[ ]+mov rax\{k2\}, rbx
-[ ]*21[ ]+vaddps zmm2\{z\}\{k1\}\{z\}, zmm1, zmm3
-[ ]*22[ ]+vaddps zmm2\{z\}, zmm1\{k3\}, zmm3
-[ ]*23[ ]+vaddps zmm2\{k2\}, zmm1\{k1\}, zmm3
-[ ]*24[ ]+
-[ ]*25[ ]+vcvtps2pd zmm1\{1to8\}, \[rax\]
-[ ]*26[ ]+vcvtps2pd zmm1, \[rax\]\{1to16\}
-[ ]*27[ ]+
-[ ]*28[ ]+vcvtps2pd zmm1, \[rax\]\{k1\}
-[ ]*29[ ]+vcvtps2pd zmm1, \[rax\]\{z\}
+[ ]*3[ ]+\.allow_index_reg
+[ ]*4[ ]+_start:
+[ ]*5[ ]+mov \{sae\}, %rax\{%k1\}
+[ ]*6[ ]+mov \{sae\}, %rax
+[ ]*7[ ]+mov %rbx, %rax\{%k2\}
+[ ]*8[ ]+vaddps %zmm3, %zmm1, %zmm2\{z\}\{%k1\}\{z\}
+[ ]*9[ ]+vaddps %zmm3, %zmm1\{%k3\}, %zmm2\{z\}
+[ ]*10[ ]+vaddps %zmm3, %zmm1\{%k1\}, %zmm2\{%k2\}
+[ ]*11[ ]+
+[ ]*12[ ]+vcvtps2pd \(%rax\), %zmm1\{1to8\}
+[ ]*13[ ]+vcvtps2pd \(%rax\)\{1to16\}, %zmm1
+[ ]*14[ ]+
+[ ]*15[ ]+vcvtps2pd \(%rax\)\{%k1\}, %zmm1
+[ ]*16[ ]+vcvtps2pd \(%rax\)\{z\}, %zmm1
+[ ]*17[ ]+
+[ ]*18[ ]+vgatherqpd \(%rdi\),%zmm6\{%k1\}
+[ ]*19[ ]+vgatherqpd \(%zmm2\),%zmm6\{%k1\}
+[ ]*20[ ]+vpscatterdd %zmm6,\(%rdi\)\{%k1\}
+[ ]*21[ ]+vpscatterdd %zmm6,\(%zmm2\)\{%k1\}
+[ ]*22[ ]+
+[ ]*23[ ]+\.intel_syntax noprefix
+[ ]*24[ ]+mov rax\{k1\}, \{sae\}
+[ ]*25[ ]+mov rax, \{sae\}
+[ ]*26[ ]+mov rax\{k2\}, rbx
+[ ]*27[ ]+vaddps zmm2\{z\}\{k1\}\{z\}, zmm1, zmm3
+[ ]*28[ ]+vaddps zmm2\{z\}, zmm1\{k3\}, zmm3
+[ ]*29[ ]+vaddps zmm2\{k2\}, zmm1\{k1\}, zmm3
[ ]*30[ ]+
-[ ]*31[ ]+vaddps zmm2, zmm1, QWORD PTR \[rax\]\{1to8\}
-[ ]*32[ ]+vaddps zmm2, zmm1, QWORD PTR \[rax\]\{1to16\}
-[ ]*33[ ]+vaddpd zmm2, zmm1, DWORD PTR \[rax\]\{1to8\}
-[ ]*34[ ]+vaddpd zmm2, zmm1, DWORD PTR \[rax\]\{1to16\}
-[ ]*35[ ]+vaddps zmm2, zmm1, ZMMWORD PTR \[rax\]\{1to16\}
-[ ]*36[ ]+vaddps zmm2, zmm1, DWORD PTR \[rax\]
-[ ]*37[ ]+vaddpd zmm2, zmm1, QWORD PTR \[rax\]
+[ ]*31[ ]+vcvtps2pd zmm1\{1to8\}, \[rax\]
+[ ]*32[ ]+vcvtps2pd zmm1, \[rax\]\{1to16\}
+[ ]*33[ ]+
+[ ]*34[ ]+vcvtps2pd zmm1, \[rax\]\{k1\}
+[ ]*35[ ]+vcvtps2pd zmm1, \[rax\]\{z\}
+[ ]*36[ ]+
+[ ]*37[ ]+vgatherqpd zmm6\{k1\}, ZMMWORD PTR \[rdi\]
+[ ]*38[ ]+vgatherqpd zmm6\{k1\}, ZMMWORD PTR \[zmm2\+riz\]
+[ ]*39[ ]+vpscatterdd ZMMWORD PTR \[rdi\]\{k1\}, zmm6
+[ ]*40[ ]+vpscatterdd ZMMWORD PTR \[zmm2\+riz\]\{k1\}, zmm6
+[ ]*41[ ]+
+[ ]*42[ ]+vaddps zmm2, zmm1, QWORD PTR \[rax\]\{1to8\}
+[ ]*43[ ]+vaddps zmm2, zmm1, QWORD PTR \[rax\]\{1to16\}
+[ ]*44[ ]+vaddpd zmm2, zmm1, DWORD PTR \[rax\]\{1to8\}
+[ ]*45[ ]+vaddpd zmm2, zmm1, DWORD PTR \[rax\]\{1to16\}
+[ ]*46[ ]+vaddps zmm2, zmm1, ZMMWORD PTR \[rax\]\{1to16\}
+[ ]*47[ ]+vaddps zmm2, zmm1, DWORD PTR \[rax\]
+[ ]*48[ ]+vaddpd zmm2, zmm1, QWORD PTR \[rax\]
diff --git a/gas/testsuite/gas/i386/x86-64-inval-avx512f.s b/gas/testsuite/gas/i386/x86-64-inval-avx512f.s
index 5ac7349..835f677 100644
--- a/gas/testsuite/gas/i386/x86-64-inval-avx512f.s
+++ b/gas/testsuite/gas/i386/x86-64-inval-avx512f.s
@@ -1,5 +1,6 @@
# Check illegal AVX512F instructions
.text
+ .allow_index_reg
_start:
mov {sae}, %rax{%k1}
mov {sae}, %rax
@@ -14,6 +15,11 @@ _start:
vcvtps2pd (%rax){%k1}, %zmm1
vcvtps2pd (%rax){z}, %zmm1
+ vgatherqpd (%rdi),%zmm6{%k1}
+ vgatherqpd (%zmm2),%zmm6{%k1}
+ vpscatterdd %zmm6,(%rdi){%k1}
+ vpscatterdd %zmm6,(%zmm2){%k1}
+
.intel_syntax noprefix
mov rax{k1}, {sae}
mov rax, {sae}
@@ -28,6 +34,11 @@ _start:
vcvtps2pd zmm1, [rax]{k1}
vcvtps2pd zmm1, [rax]{z}
+ vgatherqpd zmm6{k1}, ZMMWORD PTR [rdi]
+ vgatherqpd zmm6{k1}, ZMMWORD PTR [zmm2+riz]
+ vpscatterdd ZMMWORD PTR [rdi]{k1}, zmm6
+ vpscatterdd ZMMWORD PTR [zmm2+riz]{k1}, zmm6
+
vaddps zmm2, zmm1, QWORD PTR [rax]{1to8}
vaddps zmm2, zmm1, QWORD PTR [rax]{1to16}
vaddpd zmm2, zmm1, DWORD PTR [rax]{1to8}