* [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions. @ 2014-01-31 10:10 Michael V. Zolotukhin 2014-01-31 14:05 ` H.J. Lu 0 siblings, 1 reply; 11+ messages in thread From: Michael V. Zolotukhin @ 2014-01-31 10:10 UTC (permalink / raw) To: H.J. Lu, Jan Beulich; +Cc: binutils Hi, This patch adds test for incorrect memory operand for gather/scatter instructions, thusly fixing PR16488. Ok for trunk? gas/testsuite/ChangeLog: 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. Thanks, Michael diff --git a/gas/testsuite/gas/i386/inval-avx512f.l b/gas/testsuite/gas/i386/inval-avx512f.l index 6c525f0..1f8c414 100644 --- a/gas/testsuite/gas/i386/inval-avx512f.l +++ b/gas/testsuite/gas/i386/inval-avx512f.l @@ -10,27 +10,30 @@ .*:14: Error: .* .*:15: Error: .* .*:17: Error: .* -.*:20: Error: .* -.*:21: Error: .* +.*:18: Error: .* +.*:19: Error: .* .*:22: Error: .* .*:23: Error: .* -.*:23: Error: .* -.*:24: Error: .* .*:24: Error: .* .*:25: Error: .* .*:25: Error: .* +.*:26: Error: .* +.*:26: Error: .* +.*:27: Error: .* .*:27: Error: .* -.*:28: Error: .* +.*:29: 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: .* +.*:43: Error: .* +.*:44: Error: .* GAS LISTING .* @@ -51,27 +54,30 @@ GAS LISTING .* [ ]*15[ ]+vcvtps2pd \(%eax\)\{z\}, %zmm1 [ ]*16[ ]+ [ ]*17[ ]+vgatherqpd \(%rdi,%zmm2,8\),%zmm6 -[ ]*18[ ]+ -[ ]*19[ ]+\.intel_syntax noprefix -[ ]*20[ ]+mov eax\{k1\}, \{sae\} -[ ]*21[ ]+mov eax, \{sae\} -[ ]*22[ ]+mov eax\{k2\}, ebx -[ ]*23[ ]+vaddps zmm2\{z\}\{k1\}\{z\}, zmm1, zmm3 -[ ]*24[ ]+vaddps zmm2\{z\}, zmm1\{k3\}, zmm3 -[ ]*25[ ]+vaddps zmm2\{k2\}, zmm1\{k1\}, zmm3 -[ ]*26[ ]+ -[ ]*27[ ]+vcvtps2pd zmm1\{1to8\}, \[eax\] -[ ]*28[ ]+vcvtps2pd zmm1, \[eax\]\{1to16\} -[ ]*29[ ]+ -[ ]*30[ ]+vcvtps2pd zmm1, \[eax\]\{k1\} -[ ]*31[ ]+vcvtps2pd zmm1, \[eax\]\{z\} -[ ]*32[ ]+ -[ ]*33[ ]+vgatherqpd zmm6, ZMMWORD PTR \[rdi\+zmm2\*8\] +[ ]*18[ ]+vgatherqpd \(%edi\),%zmm6\{%k1\} +[ ]*19[ ]+vgatherqpd \(%zmm2\),%zmm6\{%k1\} +[ ]*20[ ]+ +[ ]*21[ ]+\.intel_syntax noprefix +[ ]*22[ ]+mov eax\{k1\}, \{sae\} +[ ]*23[ ]+mov eax, \{sae\} +[ ]*24[ ]+mov eax\{k2\}, ebx +[ ]*25[ ]+vaddps zmm2\{z\}\{k1\}\{z\}, zmm1, zmm3 +[ ]*26[ ]+vaddps zmm2\{z\}, zmm1\{k3\}, zmm3 +[ ]*27[ ]+vaddps zmm2\{k2\}, zmm1\{k1\}, zmm3 +[ ]*28[ ]+ +[ ]*29[ ]+vcvtps2pd zmm1\{1to8\}, \[eax\] +[ ]*30[ ]+vcvtps2pd zmm1, \[eax\]\{1to16\} +[ ]*31[ ]+ +[ ]*32[ ]+vcvtps2pd zmm1, \[eax\]\{k1\} +[ ]*33[ ]+vcvtps2pd zmm1, \[eax\]\{z\} [ ]*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[ ]+vgatherqpd zmm6, ZMMWORD PTR \[rdi\+zmm2\*8\] +[ ]*36[ ]+vgatherqpd zmm6\{k1\}, ZMMWORD PTR \[edi\] +[ ]*37[ ]+ +[ ]*38[ ]+vaddps zmm2, zmm1, QWORD PTR \[eax\]\{1to8\} +[ ]*39[ ]+vaddps zmm2, zmm1, QWORD PTR \[eax\]\{1to16\} +[ ]*40[ ]+vaddpd zmm2, zmm1, DWORD PTR \[eax\]\{1to8\} +[ ]*41[ ]+vaddpd zmm2, zmm1, DWORD PTR \[eax\]\{1to16\} +[ ]*42[ ]+vaddps zmm2, zmm1, ZMMWORD PTR \[eax\]\{1to16\} +[ ]*43[ ]+vaddps zmm2, zmm1, DWORD PTR \[eax\] +[ ]*44[ ]+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..7c9b1d6 100644 --- a/gas/testsuite/gas/i386/inval-avx512f.s +++ b/gas/testsuite/gas/i386/inval-avx512f.s @@ -15,6 +15,8 @@ _start: vcvtps2pd (%eax){z}, %zmm1 vgatherqpd (%rdi,%zmm2,8),%zmm6 + vgatherqpd (%edi),%zmm6{%k1} + vgatherqpd (%zmm2),%zmm6{%k1} .intel_syntax noprefix mov eax{k1}, {sae} @@ -31,6 +33,7 @@ _start: vcvtps2pd zmm1, [eax]{z} vgatherqpd zmm6, ZMMWORD PTR [rdi+zmm2*8] + vgatherqpd zmm6{k1}, ZMMWORD PTR [edi] 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..7d14549 100644 --- a/gas/testsuite/gas/i386/x86-64-inval-avx512f.l +++ b/gas/testsuite/gas/i386/x86-64-inval-avx512f.l @@ -9,26 +9,29 @@ .*:12: Error: .* .*:14: Error: .* .*:15: Error: .* +.*:17: Error: .* .*:18: Error: .* -.*:19: Error: .* -.*:20: Error: .* .*:21: Error: .* -.*:21: Error: .* -.*:22: Error: .* .*:22: Error: .* .*:23: Error: .* -.*:23: Error: .* +.*:24: Error: .* +.*:24: Error: .* .*:25: Error: .* +.*:25: Error: .* +.*:26: Error: .* .*:26: Error: .* .*:28: Error: .* .*:29: Error: .* .*:31: Error: .* .*:32: Error: .* -.*:33: Error: .* .*:34: Error: .* -.*:35: Error: .* .*:36: Error: .* .*:37: Error: .* +.*:38: Error: .* +.*:39: Error: .* +.*:40: Error: .* +.*:41: Error: .* +.*:42: Error: .* GAS LISTING .* @@ -48,24 +51,29 @@ GAS LISTING .* [ ]*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\} +[ ]*17[ ]+vgatherqpd \(%rdi\),%zmm6\{%k1\} +[ ]*18[ ]+vgatherqpd \(%zmm2\),%zmm6\{%k1\} +[ ]*19[ ]+ +[ ]*20[ ]+\.intel_syntax noprefix +[ ]*21[ ]+mov rax\{k1\}, \{sae\} +[ ]*22[ ]+mov rax, \{sae\} +[ ]*23[ ]+mov rax\{k2\}, rbx +[ ]*24[ ]+vaddps zmm2\{z\}\{k1\}\{z\}, zmm1, zmm3 +[ ]*25[ ]+vaddps zmm2\{z\}, zmm1\{k3\}, zmm3 +[ ]*26[ ]+vaddps zmm2\{k2\}, zmm1\{k1\}, zmm3 [ ]*27[ ]+ -[ ]*28[ ]+vcvtps2pd zmm1, \[rax\]\{k1\} -[ ]*29[ ]+vcvtps2pd zmm1, \[rax\]\{z\} +[ ]*28[ ]+vcvtps2pd zmm1\{1to8\}, \[rax\] +[ ]*29[ ]+vcvtps2pd zmm1, \[rax\]\{1to16\} [ ]*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, \[rax\]\{k1\} +[ ]*32[ ]+vcvtps2pd zmm1, \[rax\]\{z\} +[ ]*33[ ]+ +[ ]*34[ ]+vgatherqpd zmm6\{k1\}, ZMMWORD PTR \[rdi\] +[ ]*35[ ]+ +[ ]*36[ ]+vaddps zmm2, zmm1, QWORD PTR \[rax\]\{1to8\} +[ ]*37[ ]+vaddps zmm2, zmm1, QWORD PTR \[rax\]\{1to16\} +[ ]*38[ ]+vaddpd zmm2, zmm1, DWORD PTR \[rax\]\{1to8\} +[ ]*39[ ]+vaddpd zmm2, zmm1, DWORD PTR \[rax\]\{1to16\} +[ ]*40[ ]+vaddps zmm2, zmm1, ZMMWORD PTR \[rax\]\{1to16\} +[ ]*41[ ]+vaddps zmm2, zmm1, DWORD PTR \[rax\] +[ ]*42[ ]+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..9e8823e 100644 --- a/gas/testsuite/gas/i386/x86-64-inval-avx512f.s +++ b/gas/testsuite/gas/i386/x86-64-inval-avx512f.s @@ -14,6 +14,9 @@ _start: vcvtps2pd (%rax){%k1}, %zmm1 vcvtps2pd (%rax){z}, %zmm1 + vgatherqpd (%rdi),%zmm6{%k1} + vgatherqpd (%zmm2),%zmm6{%k1} + .intel_syntax noprefix mov rax{k1}, {sae} mov rax, {sae} @@ -28,6 +31,8 @@ _start: vcvtps2pd zmm1, [rax]{k1} vcvtps2pd zmm1, [rax]{z} + vgatherqpd zmm6{k1}, ZMMWORD PTR [rdi] + vaddps zmm2, zmm1, QWORD PTR [rax]{1to8} vaddps zmm2, zmm1, QWORD PTR [rax]{1to16} vaddpd zmm2, zmm1, DWORD PTR [rax]{1to8} ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions. 2014-01-31 10:10 [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions Michael V. Zolotukhin @ 2014-01-31 14:05 ` H.J. Lu 2014-01-31 14:38 ` Michael Zolotukhin 0 siblings, 1 reply; 11+ messages in thread From: H.J. Lu @ 2014-01-31 14:05 UTC (permalink / raw) To: Michael V. Zolotukhin; +Cc: Jan Beulich, Binutils On Fri, Jan 31, 2014 at 2:09 AM, Michael V. Zolotukhin <michael.v.zolotukhin@gmail.com> wrote: > Hi, > > This patch adds test for incorrect memory operand for gather/scatter > instructions, thusly fixing PR16488. Ok for trunk? > > gas/testsuite/ChangeLog: > 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. > > Thanks, > Michael > > diff --git a/gas/testsuite/gas/i386/inval-avx512f.s b/gas/testsuite/gas/i386/inval-avx512f.s > index b1ddba4..7c9b1d6 100644 > --- a/gas/testsuite/gas/i386/inval-avx512f.s > +++ b/gas/testsuite/gas/i386/inval-avx512f.s > @@ -15,6 +15,8 @@ _start: > vcvtps2pd (%eax){z}, %zmm1 > > vgatherqpd (%rdi,%zmm2,8),%zmm6 > + vgatherqpd (%edi),%zmm6{%k1} > + vgatherqpd (%zmm2),%zmm6{%k1} > > .intel_syntax noprefix > mov eax{k1}, {sae} > @@ -31,6 +33,7 @@ _start: > vcvtps2pd zmm1, [eax]{z} > > vgatherqpd zmm6, ZMMWORD PTR [rdi+zmm2*8] > + vgatherqpd zmm6{k1}, ZMMWORD PTR [edi] > > 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.s b/gas/testsuite/gas/i386/x86-64-inval-avx512f.s > index 5ac7349..9e8823e 100644 > --- a/gas/testsuite/gas/i386/x86-64-inval-avx512f.s > +++ b/gas/testsuite/gas/i386/x86-64-inval-avx512f.s > @@ -14,6 +14,9 @@ _start: > vcvtps2pd (%rax){%k1}, %zmm1 > vcvtps2pd (%rax){z}, %zmm1 > > + vgatherqpd (%rdi),%zmm6{%k1} > + vgatherqpd (%zmm2),%zmm6{%k1} > + > .intel_syntax noprefix > mov rax{k1}, {sae} > mov rax, {sae} > @@ -28,6 +31,8 @@ _start: > vcvtps2pd zmm1, [rax]{k1} > vcvtps2pd zmm1, [rax]{z} > > + vgatherqpd zmm6{k1}, ZMMWORD PTR [rdi] > + > vaddps zmm2, zmm1, QWORD PTR [rax]{1to8} > vaddps zmm2, zmm1, QWORD PTR [rax]{1to16} > vaddpd zmm2, zmm1, DWORD PTR [rax]{1to8} You added 2 tests for AT&T syntax, but only 1 for Intel syntax. Any particular reason for this? -- H.J. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions. 2014-01-31 14:05 ` H.J. Lu @ 2014-01-31 14:38 ` Michael Zolotukhin 2014-01-31 14:53 ` H.J. Lu 2014-01-31 14:58 ` Jan Beulich 0 siblings, 2 replies; 11+ messages in thread From: Michael Zolotukhin @ 2014-01-31 14:38 UTC (permalink / raw) To: H.J. Lu; +Cc: Jan Beulich, Binutils > You added 2 tests for AT&T syntax, but only 1 for > Intel syntax. Any particular reason for this? Yes, the following test doesn't give an error: vgatherqpd zmm6{k1}, ZMMWORD PTR [zmm3] I think it's because it is equivalent to something like vgatherqpd (,%zmm2,),%zmm6{%k1} (please note commas around zmm2), which also doesn't lead to an error. I assume that in Intel syntax this test is regarded as a rich addressing mode, which is acceptable for gather/scatters. However, I'm not sure about this - please correct me if I'm wrong. Thanks, Michael > H.J. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions. 2014-01-31 14:38 ` Michael Zolotukhin @ 2014-01-31 14:53 ` H.J. Lu 2014-01-31 14:55 ` Michael Zolotukhin 2014-01-31 14:58 ` Jan Beulich 1 sibling, 1 reply; 11+ messages in thread From: H.J. Lu @ 2014-01-31 14:53 UTC (permalink / raw) To: Michael Zolotukhin; +Cc: Jan Beulich, Binutils On Fri, Jan 31, 2014 at 6:38 AM, Michael Zolotukhin <michael.v.zolotukhin@gmail.com> wrote: >> You added 2 tests for AT&T syntax, but only 1 for >> Intel syntax. Any particular reason for this? > Yes, the following test doesn't give an error: > vgatherqpd zmm6{k1}, ZMMWORD PTR [zmm3] > I think it's because it is equivalent to something like vgatherqpd > (,%zmm2,),%zmm6{%k1} (please note commas around zmm2), which also > doesn't lead to an error. I assume that in Intel syntax this test is > regarded as a rich addressing mode, which is acceptable for > gather/scatters. However, I'm not sure about this - please correct me > if I'm wrong. You can use "zmm3+riz" to force zmm as base register: [hjl@gnu-6 tmp]$ cat sib.s .text .allow_index_reg vgatherqpd (%zmm2),%zmm6{%k1} .intel_syntax noprefix vgatherqpd zmm6{k1}, ZMMWORD PTR [zmm3+riz] vgatherqpd zmm6{k1}, ZMMWORD PTR [zmm3+rax] [hjl@gnu-6 tmp]$ gcc -c sib.s sib.s: Assembler messages: sib.s:3: Error: `(%zmm2)' is not a valid base/index expression sib.s:5: Error: `ZMMWORD PTR [zmm3+riz]' is not a valid base/index expression [hjl@gnu-6 tmp]$ -- H.J. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions. 2014-01-31 14:53 ` H.J. Lu @ 2014-01-31 14:55 ` Michael Zolotukhin 0 siblings, 0 replies; 11+ messages in thread From: Michael Zolotukhin @ 2014-01-31 14:55 UTC (permalink / raw) To: H.J. Lu; +Cc: Jan Beulich, Binutils > You can use "zmm3+riz" to force zmm as base register: Thanks for the hint, I'll send an updated patch shortly. Michael > H.J. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions. 2014-01-31 14:38 ` Michael Zolotukhin 2014-01-31 14:53 ` H.J. Lu @ 2014-01-31 14:58 ` Jan Beulich 2014-01-31 15:35 ` Michael Zolotukhin 1 sibling, 1 reply; 11+ messages in thread From: Jan Beulich @ 2014-01-31 14:58 UTC (permalink / raw) To: H.J. Lu, Michael Zolotukhin; +Cc: Binutils >>> On 31.01.14 at 15:38, Michael Zolotukhin <michael.v.zolotukhin@gmail.com> wrote: >> You added 2 tests for AT&T syntax, but only 1 for >> Intel syntax. Any particular reason for this? > Yes, the following test doesn't give an error: > vgatherqpd zmm6{k1}, ZMMWORD PTR [zmm3] > I think it's because it is equivalent to something like vgatherqpd > (,%zmm2,),%zmm6{%k1} (please note commas around zmm2), which also > doesn't lead to an error. I assume that in Intel syntax this test is > regarded as a rich addressing mode, which is acceptable for > gather/scatters. However, I'm not sure about this - please correct me > if I'm wrong. That's correct - the order of registers in a memory address can get swapped if that results in a valid address. Jan ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions. 2014-01-31 14:58 ` Jan Beulich @ 2014-01-31 15:35 ` Michael Zolotukhin 2014-01-31 15:41 ` H.J. Lu 0 siblings, 1 reply; 11+ messages in thread From: Michael Zolotukhin @ 2014-01-31 15:35 UTC (permalink / raw) To: Jan Beulich; +Cc: H.J. Lu, Binutils [-- Attachment #1: Type: text/plain, Size: 97 bytes --] Hi, The updated patch is attached, changelog is the same. Is it ok for trunk? Thanks, Michael [-- Attachment #2: pr16488-v2.patch --] [-- Type: application/octet-stream, Size: 10465 bytes --] diff --git a/gas/testsuite/gas/i386/inval-avx512f.l b/gas/testsuite/gas/i386/inval-avx512f.l index 6c525f0..0f170d8 100644 --- a/gas/testsuite/gas/i386/inval-avx512f.l +++ b/gas/testsuite/gas/i386/inval-avx512f.l @@ -1,77 +1,86 @@ .*: 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: .* +.*:26: Error: .* .*:27: Error: .* +.*:27: Error: .* +.*:28: Error: .* .*:28: Error: .* .*:30: Error: .* .*:31: Error: .* .*:33: Error: .* -.*:35: Error: .* +.*:34: Error: .* .*:36: Error: .* .*:37: Error: .* .*:38: Error: .* -.*:39: Error: .* .*:40: Error: .* .*:41: Error: .* +.*:42: Error: .* +.*:43: Error: .* +.*:44: Error: .* +.*:45: Error: .* +.*:46: 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\}, %zmm2\{z\} -[ ]*9[ ]+vaddps %zmm3, %zmm1\{%k1\}, %zmm2\{%k2\} -[ ]*10[ ]+ -[ ]*11[ ]+vcvtps2pd \(%eax\), %zmm1\{1to8\} -[ ]*12[ ]+vcvtps2pd \(%eax\)\{1to16\}, %zmm1 -[ ]*13[ ]+ -[ ]*14[ ]+vcvtps2pd \(%eax\)\{%k1\}, %zmm1 -[ ]*15[ ]+vcvtps2pd \(%eax\)\{z\}, %zmm1 -[ ]*16[ ]+ -[ ]*17[ ]+vgatherqpd \(%rdi,%zmm2,8\),%zmm6 -[ ]*18[ ]+ -[ ]*19[ ]+\.intel_syntax noprefix -[ ]*20[ ]+mov eax\{k1\}, \{sae\} -[ ]*21[ ]+mov eax, \{sae\} -[ ]*22[ ]+mov eax\{k2\}, ebx -[ ]*23[ ]+vaddps zmm2\{z\}\{k1\}\{z\}, zmm1, zmm3 -[ ]*24[ ]+vaddps zmm2\{z\}, zmm1\{k3\}, zmm3 -[ ]*25[ ]+vaddps zmm2\{k2\}, zmm1\{k1\}, zmm3 -[ ]*26[ ]+ -[ ]*27[ ]+vcvtps2pd zmm1\{1to8\}, \[eax\] -[ ]*28[ ]+vcvtps2pd zmm1, \[eax\]\{1to16\} +[ ]*3[ ]+\.allow_index_reg +[ ]*4[ ]+_start: +[ ]*5[ ]+mov \{sae\}, %eax\{%k1\} +[ ]*6[ ]+mov \{sae\}, %eax +[ ]*7[ ]+mov %ebx, %eax\{%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 \(%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[ ]+ +[ ]*22[ ]+\.intel_syntax noprefix +[ ]*23[ ]+mov eax\{k1\}, \{sae\} +[ ]*24[ ]+mov eax, \{sae\} +[ ]*25[ ]+mov eax\{k2\}, ebx +[ ]*26[ ]+vaddps zmm2\{z\}\{k1\}\{z\}, zmm1, zmm3 +[ ]*27[ ]+vaddps zmm2\{z\}, zmm1\{k3\}, zmm3 +[ ]*28[ ]+vaddps zmm2\{k2\}, zmm1\{k1\}, zmm3 [ ]*29[ ]+ -[ ]*30[ ]+vcvtps2pd zmm1, \[eax\]\{k1\} -[ ]*31[ ]+vcvtps2pd zmm1, \[eax\]\{z\} +[ ]*30[ ]+vcvtps2pd zmm1\{1to8\}, \[eax\] +[ ]*31[ ]+vcvtps2pd zmm1, \[eax\]\{1to16\} [ ]*32[ ]+ -[ ]*33[ ]+vgatherqpd zmm6, ZMMWORD PTR \[rdi\+zmm2\*8\] -[ ]*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\] +[ ]*33[ ]+vcvtps2pd zmm1, \[eax\]\{k1\} +[ ]*34[ ]+vcvtps2pd zmm1, \[eax\]\{z\} +[ ]*35[ ]+ +[ ]*36[ ]+vgatherqpd zmm6, ZMMWORD PTR \[rdi\+zmm2\*8\] +[ ]*37[ ]+vgatherqpd zmm6\{k1\}, ZMMWORD PTR \[edi\] +[ ]*38[ ]+vgatherqpd zmm6\{k1\}, ZMMWORD PTR \[zmm2\+eiz\] +[ ]*39[ ]+ +[ ]*40[ ]+vaddps zmm2, zmm1, QWORD PTR \[eax\]\{1to8\} +[ ]*41[ ]+vaddps zmm2, zmm1, QWORD PTR \[eax\]\{1to16\} +[ ]*42[ ]+vaddpd zmm2, zmm1, DWORD PTR \[eax\]\{1to8\} +[ ]*43[ ]+vaddpd zmm2, zmm1, DWORD PTR \[eax\]\{1to16\} +[ ]*44[ ]+vaddps zmm2, zmm1, ZMMWORD PTR \[eax\]\{1to16\} +[ ]*45[ ]+vaddps zmm2, zmm1, DWORD PTR \[eax\] +[ ]*46[ ]+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..8cffe27 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,8 @@ _start: vcvtps2pd (%eax){z}, %zmm1 vgatherqpd (%rdi,%zmm2,8),%zmm6 + vgatherqpd (%edi),%zmm6{%k1} + vgatherqpd (%zmm2),%zmm6{%k1} .intel_syntax noprefix mov eax{k1}, {sae} @@ -31,6 +34,8 @@ _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] 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..a78d70c 100644 --- a/gas/testsuite/gas/i386/x86-64-inval-avx512f.l +++ b/gas/testsuite/gas/i386/x86-64-inval-avx512f.l @@ -1,71 +1,82 @@ .*: 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: .* +.*:25: Error: .* +.*:26: Error: .* .*:26: Error: .* -.*:28: Error: .* +.*:27: Error: .* +.*:27: Error: .* .*:29: Error: .* -.*:31: Error: .* +.*:30: Error: .* .*:32: Error: .* .*:33: Error: .* -.*:34: Error: .* .*:35: Error: .* .*:36: Error: .* -.*:37: Error: .* +.*:38: Error: .* +.*:39: Error: .* +.*:40: Error: .* +.*:41: Error: .* +.*:42: Error: .* +.*:43: Error: .* +.*:44: 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\} -[ ]*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\] +[ ]*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[ ]+ +[ ]*21[ ]+\.intel_syntax noprefix +[ ]*22[ ]+mov rax\{k1\}, \{sae\} +[ ]*23[ ]+mov rax, \{sae\} +[ ]*24[ ]+mov rax\{k2\}, rbx +[ ]*25[ ]+vaddps zmm2\{z\}\{k1\}\{z\}, zmm1, zmm3 +[ ]*26[ ]+vaddps zmm2\{z\}, zmm1\{k3\}, zmm3 +[ ]*27[ ]+vaddps zmm2\{k2\}, zmm1\{k1\}, zmm3 +[ ]*28[ ]+ +[ ]*29[ ]+vcvtps2pd zmm1\{1to8\}, \[rax\] +[ ]*30[ ]+vcvtps2pd zmm1, \[rax\]\{1to16\} +[ ]*31[ ]+ +[ ]*32[ ]+vcvtps2pd zmm1, \[rax\]\{k1\} +[ ]*33[ ]+vcvtps2pd zmm1, \[rax\]\{z\} +[ ]*34[ ]+ +[ ]*35[ ]+vgatherqpd zmm6\{k1\}, ZMMWORD PTR \[rdi\] +[ ]*36[ ]+vgatherqpd zmm6\{k1\}, ZMMWORD PTR \[zmm2\+riz\] +[ ]*37[ ]+ +[ ]*38[ ]+vaddps zmm2, zmm1, QWORD PTR \[rax\]\{1to8\} +[ ]*39[ ]+vaddps zmm2, zmm1, QWORD PTR \[rax\]\{1to16\} +[ ]*40[ ]+vaddpd zmm2, zmm1, DWORD PTR \[rax\]\{1to8\} +[ ]*41[ ]+vaddpd zmm2, zmm1, DWORD PTR \[rax\]\{1to16\} +[ ]*42[ ]+vaddps zmm2, zmm1, ZMMWORD PTR \[rax\]\{1to16\} +[ ]*43[ ]+vaddps zmm2, zmm1, DWORD PTR \[rax\] +[ ]*44[ ]+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..3ec42b4 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,9 @@ _start: vcvtps2pd (%rax){%k1}, %zmm1 vcvtps2pd (%rax){z}, %zmm1 + vgatherqpd (%rdi),%zmm6{%k1} + vgatherqpd (%zmm2),%zmm6{%k1} + .intel_syntax noprefix mov rax{k1}, {sae} mov rax, {sae} @@ -28,6 +32,9 @@ _start: vcvtps2pd zmm1, [rax]{k1} vcvtps2pd zmm1, [rax]{z} + vgatherqpd zmm6{k1}, ZMMWORD PTR [rdi] + vgatherqpd zmm6{k1}, ZMMWORD PTR [zmm2+riz] + vaddps zmm2, zmm1, QWORD PTR [rax]{1to8} vaddps zmm2, zmm1, QWORD PTR [rax]{1to16} vaddpd zmm2, zmm1, DWORD PTR [rax]{1to8} ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions. 2014-01-31 15:35 ` Michael Zolotukhin @ 2014-01-31 15:41 ` H.J. Lu 2014-01-31 16:06 ` Michael Zolotukhin 0 siblings, 1 reply; 11+ messages in thread From: H.J. Lu @ 2014-01-31 15:41 UTC (permalink / raw) To: Michael Zolotukhin; +Cc: Jan Beulich, Binutils On Fri, Jan 31, 2014 at 7:35 AM, Michael Zolotukhin <michael.v.zolotukhin@gmail.com> wrote: > Hi, > > The updated patch is attached, changelog is the same. Is it ok for trunk? > ChangeLog says: * gas/i386/inval-avx512f.s: Add test for incorrect memory operand for gather/scatter instructions. But I didn't see any scatter instructions. Please add some. Thanks. -- H.J. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions. 2014-01-31 15:41 ` H.J. Lu @ 2014-01-31 16:06 ` Michael Zolotukhin 2014-01-31 16:26 ` H.J. Lu 0 siblings, 1 reply; 11+ messages in thread From: Michael Zolotukhin @ 2014-01-31 16:06 UTC (permalink / raw) To: H.J. Lu; +Cc: Jan Beulich, Binutils [-- Attachment #1: Type: text/plain, Size: 266 bytes --] > ChangeLog says: > > * gas/i386/inval-avx512f.s: Add test for incorrect memory operand for > gather/scatter instructions. > > But I didn't see any scatter instructions. Please add some. Thanks for noticing that, fixed patch is attached. Michael > H.J. [-- Attachment #2: pr16488-v3.patch --] [-- Type: application/octet-stream, Size: 11315 bytes --] 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\}, %zmm2\{z\} -[ ]*9[ ]+vaddps %zmm3, %zmm1\{%k1\}, %zmm2\{%k2\} -[ ]*10[ ]+ -[ ]*11[ ]+vcvtps2pd \(%eax\), %zmm1\{1to8\} -[ ]*12[ ]+vcvtps2pd \(%eax\)\{1to16\}, %zmm1 -[ ]*13[ ]+ -[ ]*14[ ]+vcvtps2pd \(%eax\)\{%k1\}, %zmm1 -[ ]*15[ ]+vcvtps2pd \(%eax\)\{z\}, %zmm1 -[ ]*16[ ]+ -[ ]*17[ ]+vgatherqpd \(%rdi,%zmm2,8\),%zmm6 -[ ]*18[ ]+ -[ ]*19[ ]+\.intel_syntax noprefix -[ ]*20[ ]+mov eax\{k1\}, \{sae\} -[ ]*21[ ]+mov eax, \{sae\} -[ ]*22[ ]+mov eax\{k2\}, ebx -[ ]*23[ ]+vaddps zmm2\{z\}\{k1\}\{z\}, zmm1, zmm3 -[ ]*24[ ]+vaddps zmm2\{z\}, zmm1\{k3\}, zmm3 -[ ]*25[ ]+vaddps zmm2\{k2\}, zmm1\{k1\}, zmm3 -[ ]*26[ ]+ -[ ]*27[ ]+vcvtps2pd zmm1\{1to8\}, \[eax\] -[ ]*28[ ]+vcvtps2pd zmm1, \[eax\]\{1to16\} -[ ]*29[ ]+ -[ ]*30[ ]+vcvtps2pd zmm1, \[eax\]\{k1\} -[ ]*31[ ]+vcvtps2pd zmm1, \[eax\]\{z\} -[ ]*32[ ]+ -[ ]*33[ ]+vgatherqpd zmm6, ZMMWORD PTR \[rdi\+zmm2\*8\] +[ ]*3[ ]+\.allow_index_reg +[ ]*4[ ]+_start: +[ ]*5[ ]+mov \{sae\}, %eax\{%k1\} +[ ]*6[ ]+mov \{sae\}, %eax +[ ]*7[ ]+mov %ebx, %eax\{%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 \(%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} ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions. 2014-01-31 16:06 ` Michael Zolotukhin @ 2014-01-31 16:26 ` H.J. Lu 2014-01-31 16:31 ` Michael Zolotukhin 0 siblings, 1 reply; 11+ messages in thread From: H.J. Lu @ 2014-01-31 16:26 UTC (permalink / raw) To: Michael Zolotukhin; +Cc: Jan Beulich, Binutils On Fri, Jan 31, 2014 at 8:06 AM, Michael Zolotukhin <michael.v.zolotukhin@gmail.com> wrote: >> ChangeLog says: >> >> * gas/i386/inval-avx512f.s: Add test for incorrect memory operand for >> gather/scatter instructions. >> >> But I didn't see any scatter instructions. Please add some. > Thanks for noticing that, fixed patch is attached. I checked it into master and backported it to 2.24 together with 3 other fixes of yours. Thanks. -- H.J. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions. 2014-01-31 16:26 ` H.J. Lu @ 2014-01-31 16:31 ` Michael Zolotukhin 0 siblings, 0 replies; 11+ messages in thread From: Michael Zolotukhin @ 2014-01-31 16:31 UTC (permalink / raw) To: H.J. Lu; +Cc: Jan Beulich, Binutils > I checked it into master and backported it to 2.24 together > with 3 other fixes of yours. Thanks! Best regards, Michael ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-01-31 16:31 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-01-31 10:10 [PATCH] PR gas/16488: Add test for incorrect memory operand for gather/scatter instructions Michael V. Zolotukhin 2014-01-31 14:05 ` H.J. Lu 2014-01-31 14:38 ` Michael Zolotukhin 2014-01-31 14:53 ` H.J. Lu 2014-01-31 14:55 ` Michael Zolotukhin 2014-01-31 14:58 ` Jan Beulich 2014-01-31 15:35 ` Michael Zolotukhin 2014-01-31 15:41 ` H.J. Lu 2014-01-31 16:06 ` Michael Zolotukhin 2014-01-31 16:26 ` H.J. Lu 2014-01-31 16:31 ` Michael Zolotukhin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).