As mentioned in http://gcc.gnu.org/PR90028 while a gas bug has been fixed since 2.31, I couldn't find any gas/testsuite/i386/ testsuite coverage for (,%[xyz]mm*,*) or disp(,%[xyz]mm*,*) VSIB addressing even on binutils trunk.
Fixed in bintuils with: commit 629cfaf1b0fbb32a985607c774bd8e7870b9fa94 (HEAD, refs/bisect/bad) Author: Jan Beulich <jbeulich@novell.com> Date: Mon Jul 30 17:25:05 2018 +0200 x86: don't mistakenly scale non-8-bit displacements In commit b5014f7af2 I've removed (instead of replaced) a conditional, resulting in addressing forms not allowing 8-bit displacements to now get their displacements scaled under certain circumstances. Re-add the missing conditional. Minimal reproducer: $ cat min.s .text foo: vpgatherqq 8(,%ymm1,1), %ymm0{%k2} $ ./gas/as-new --64 min.s -o avx512.o && ./binutils/objdump -S avx512.o avx512.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <foo>: 0: 62 f2 fd 2a 91 04 0d vpgatherqq 0x1(,%ymm1,1),%ymm0{%k2} 7: 01 00 00 00
(In reply to Martin Liška from comment #1) > Fixed in bintuils with: > > commit 629cfaf1b0fbb32a985607c774bd8e7870b9fa94 (HEAD, refs/bisect/bad) > Author: Jan Beulich <jbeulich@novell.com> > Date: Mon Jul 30 17:25:05 2018 +0200 > > x86: don't mistakenly scale non-8-bit displacements I don't understand this comment: Said commit does not add any S/G test case(s) o the testsuite. I don't think you should have copied the respective gcc bug comment here.
(In reply to Jan Beulich from comment #2) > (In reply to Martin Liška from comment #1) > > Fixed in bintuils with: > > > > commit 629cfaf1b0fbb32a985607c774bd8e7870b9fa94 (HEAD, refs/bisect/bad) > > Author: Jan Beulich <jbeulich@novell.com> > > Date: Mon Jul 30 17:25:05 2018 +0200 > > > > x86: don't mistakenly scale non-8-bit displacements > > I don't understand this comment: Said commit does not add any S/G test > case(s) o the testsuite. I don't think you should have copied the respective > gcc bug comment here. Yes, I should have mentioned that the commit fixes the problem and that it would be nice to add the assembly snippet to test suite.
Well, ideally not just that, but much more. grep 'gather.*(,' gas/testsuite/gas/i386/*.s shows those VEX encoded ones testing this (in AT&T mode), so perhaps just copy and tweak all or big part of the grep '\(gather\|scatter\).*(.*{' gas/testsuite/gas/i386/*.s tests and remove the base register in those (ditto for Intel mode). (, has EVEX coverage only in the invalid tests, not the valid ones.
Dup. *** This bug has been marked as a duplicate of bug 23465 ***
It is not a dup, this PR is about missing testsuite coverage, which is still the case on binutils trunk.
(In reply to Jakub Jelinek from comment #6) > It is not a dup, this PR is about missing testsuite coverage, which is still > the case on binutils trunk. If you take out the fix, some tests will fail: FAIL: ix86 EVEX no disp scaling FAIL: x86-64 EVEX no disp scaling commit 629cfaf1b0fbb32a985607c774bd8e7870b9fa94 Author: Jan Beulich <jbeulich@novell.com> Date: Mon Jul 30 17:25:05 2018 +0200 x86: don't mistakenly scale non-8-bit displacements In commit b5014f7af2 I've removed (instead of replaced) a conditional, resulting in addressing forms not allowing 8-bit displacements to now get their displacements scaled under certain circumstances. Re-add the missing conditional. diff --git a/gas/ChangeLog b/gas/ChangeLog index 3f5c4e5638..8f77c3d448 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2018-07-30 Jan Beulich <jbeulich@suse.com> + + PR gas/23465 + * config/tc-i386.c (output_disp): Restrict scaling. + * testsuite/gas/i386/evex-no-scale.s, + testsuite/gas/i386/evex-no-scale-32.d + testsuite/gas/i386/evex-no-scale-64.d: New. + * testsuite/gas/i386/i386.exp: Run new tests.
The problem is EVEX disp8 without base register, not VSIB.
Yes, but none of those tests test the VSIB addressing. We do have AVX2 tests for no base register, why not have also AVX512 VSIB tests?
(In reply to Jakub Jelinek from comment #9) > Yes, but none of those tests test the VSIB addressing. > We do have AVX2 tests for no base register, why not have also AVX512 VSIB > tests? I don't think this adds additional test coverage to assembler.