From 8444f82a1d163171deccfcf014cc31adb81f703b Mon Sep 17 00:00:00 2001 From: Michael Zolotukhin Date: Wed, 22 Jan 2014 09:57:31 -0800 Subject: [PATCH] Add check for invalid register in AVX512 gathers AVX512 gather instructions shouldn't accept the same register for both destination and index. gas/ 2014-01-22 Michael Zolotukhin PR gas/16489 * config/tc-i386.c (check_VecOperands): Add check for invalid register set in AVX512 gathers. gas/testsuite/ 2014-01-22 Michael Zolotukhin PR gas/16489 * gas/i386/vgather-check.s: Add tests for AVX512 gathers. * gas/i386/x86-64-vgather-check.s: Likewise. * gas/i386/vgather-check-error.l: Update correspondingly. * gas/i386/vgather-check-none.d: Likewise. * gas/i386/vgather-check-warn.d: Likewise. * gas/i386/vgather-check-warn.e: Likewise. * gas/i386/vgather-check.d: Likewise. * gas/i386/x86-64-vgather-check-error.l: Likewise. * gas/i386/x86-64-vgather-check-none.d: Likewise. * gas/i386/x86-64-vgather-check-warn.d: Likewise. * gas/i386/x86-64-vgather-check-warn.e: Likewise. * gas/i386/x86-64-vgather-check.d: Likewise. --- gas/ChangeLog | 6 ++++++ gas/config/tc-i386.c | 16 ++++++++++++++++ gas/testsuite/ChangeLog | 16 ++++++++++++++++ gas/testsuite/gas/i386/vgather-check-error.l | 8 ++++++++ gas/testsuite/gas/i386/vgather-check-none.d | 18 ++++++++++++++++++ gas/testsuite/gas/i386/vgather-check-warn.d | 18 ++++++++++++++++++ gas/testsuite/gas/i386/vgather-check-warn.e | 8 ++++++++ gas/testsuite/gas/i386/vgather-check.d | 18 ++++++++++++++++++ gas/testsuite/gas/i386/vgather-check.s | 18 ++++++++++++++++++ .../gas/i386/x86-64-vgather-check-error.l | 8 ++++++++ .../gas/i386/x86-64-vgather-check-none.d | 18 ++++++++++++++++++ .../gas/i386/x86-64-vgather-check-warn.d | 18 ++++++++++++++++++ .../gas/i386/x86-64-vgather-check-warn.e | 8 ++++++++ gas/testsuite/gas/i386/x86-64-vgather-check.d | 18 ++++++++++++++++++ gas/testsuite/gas/i386/x86-64-vgather-check.s | 18 ++++++++++++++++++ 15 files changed, 214 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index 64a67789479..a79ceb948a2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2014-01-22 Michael Zolotukhin + + PR gas/16489 + * config/tc-i386.c (check_VecOperands): Add check for invalid + register set in AVX512 gathers. + 2014-01-22 Alan Modra * config/tc-tic4x.c (md_shortopts): s/CONST/const/. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 147acdfa36c..34af1a18621 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -4395,6 +4395,22 @@ check_VecOperands (const insn_template *t) } as_warn (_("mask, index, and destination registers should be distinct")); } + else if (i.reg_operands == 1 && i.mask) + { + if ((i.types[1].bitfield.regymm + || i.types[1].bitfield.regzmm) + && (register_number (i.op[1].regs) + == register_number (i.index_reg))) + { + if (operand_check == check_error) + { + i.error = invalid_vector_register_set; + return 1; + } + if (operand_check != check_none) + as_warn (_("index and destination registers should be distinct")); + } + } } /* Check if broadcast is supported by the instruction and is applied diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 17694f8c268..cf8eda94290 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,19 @@ +2014-01-22 Michael Zolotukhin + + PR gas/16489 + * gas/i386/vgather-check.s: Add tests for AVX512 gathers. + * gas/i386/x86-64-vgather-check.s: Likewise. + * gas/i386/vgather-check-error.l: Update correspondingly. + * gas/i386/vgather-check-none.d: Likewise. + * gas/i386/vgather-check-warn.d: Likewise. + * gas/i386/vgather-check-warn.e: Likewise. + * gas/i386/vgather-check.d: Likewise. + * gas/i386/x86-64-vgather-check-error.l: Likewise. + * gas/i386/x86-64-vgather-check-none.d: Likewise. + * gas/i386/x86-64-vgather-check-warn.d: Likewise. + * gas/i386/x86-64-vgather-check-warn.e: Likewise. + * gas/i386/x86-64-vgather-check.d: Likewise. + 2014-01-17 Will Newton * gas/arm/armv8-a+fp.d: Correct encoding of vcvta.s32.f64. diff --git a/gas/testsuite/gas/i386/vgather-check-error.l b/gas/testsuite/gas/i386/vgather-check-error.l index 41273dc3bfe..a86ccd50b10 100644 --- a/gas/testsuite/gas/i386/vgather-check-error.l +++ b/gas/testsuite/gas/i386/vgather-check-error.l @@ -2,3 +2,11 @@ .*:6: Error: .* .*:7: Error: .* .*:8: Error: .* +.*:12: Error: .* +.*:14: Error: .* +.*:16: Error: .* +.*:18: Error: .* +.*:20: Error: .* +.*:22: Error: .* +.*:24: Error: .* +.*:26: Error: .* diff --git a/gas/testsuite/gas/i386/vgather-check-none.d b/gas/testsuite/gas/i386/vgather-check-none.d index b51cc9482c1..8abdfcbec82 100644 --- a/gas/testsuite/gas/i386/vgather-check-none.d +++ b/gas/testsuite/gas/i386/vgather-check-none.d @@ -11,4 +11,22 @@ Disassembly of section .text: [ ]*[a-f0-9]+:[ ]+c4 e2 69 92 14 48[ ]+vgatherdps %xmm2,\(%eax,%xmm1,2\),%xmm2 [ ]*[a-f0-9]+:[ ]+c4 e2 71 92 04 88[ ]+vgatherdps %xmm1,\(%eax,%xmm1,4\),%xmm0 [ ]*[a-f0-9]+:[ ]+c4 e2 69 92 0c c8[ ]+vgatherdps %xmm2,\(%eax,%xmm1,8\),%xmm1 + +00000018 : +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 92 b4 fd 7b 00 00 00[ ]+vgatherdpd 0x7b\(%ebp,%ymm7,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 92 b4 f5 7b 00 00 00[ ]+vgatherdpd 0x7b\(%ebp,%ymm6,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 92 b4 fd 7b 00 00 00[ ]+vgatherdps 0x7b\(%ebp,%zmm7,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 92 b4 f5 7b 00 00 00[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\(%ebp,%zmm7,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 91 b4 f5 7b 00 00 00[ ]+vpgatherqq 0x7b\(%ebp,%zmm6,8\),%zmm6\{%k1\} #pass diff --git a/gas/testsuite/gas/i386/vgather-check-warn.d b/gas/testsuite/gas/i386/vgather-check-warn.d index 22be2475c39..985f7138907 100644 --- a/gas/testsuite/gas/i386/vgather-check-warn.d +++ b/gas/testsuite/gas/i386/vgather-check-warn.d @@ -12,4 +12,22 @@ Disassembly of section .text: [ ]*[a-f0-9]+:[ ]+c4 e2 69 92 14 48[ ]+vgatherdps %xmm2,\(%eax,%xmm1,2\),%xmm2 [ ]*[a-f0-9]+:[ ]+c4 e2 71 92 04 88[ ]+vgatherdps %xmm1,\(%eax,%xmm1,4\),%xmm0 [ ]*[a-f0-9]+:[ ]+c4 e2 69 92 0c c8[ ]+vgatherdps %xmm2,\(%eax,%xmm1,8\),%xmm1 + +00000018 : +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 92 b4 fd 7b 00 00 00[ ]+vgatherdpd 0x7b\(%ebp,%ymm7,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 92 b4 f5 7b 00 00 00[ ]+vgatherdpd 0x7b\(%ebp,%ymm6,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 92 b4 fd 7b 00 00 00[ ]+vgatherdps 0x7b\(%ebp,%zmm7,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 92 b4 f5 7b 00 00 00[ ]+vgatherdps 0x7b\(%ebp,%zmm6,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 93 b4 fd 7b 00 00 00[ ]+vgatherqpd 0x7b\(%ebp,%zmm7,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 93 b4 f5 7b 00 00 00[ ]+vgatherqpd 0x7b\(%ebp,%zmm6,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 93 b4 fd 7b 00 00 00[ ]+vgatherqps 0x7b\(%ebp,%zmm7,8\),%ymm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 93 b4 f5 7b 00 00 00[ ]+vgatherqps 0x7b\(%ebp,%zmm6,8\),%ymm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 90 b4 fd 7b 00 00 00[ ]+vpgatherdd 0x7b\(%ebp,%zmm7,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 90 b4 f5 7b 00 00 00[ ]+vpgatherdd 0x7b\(%ebp,%zmm6,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 90 b4 fd 7b 00 00 00[ ]+vpgatherdq 0x7b\(%ebp,%ymm7,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 90 b4 f5 7b 00 00 00[ ]+vpgatherdq 0x7b\(%ebp,%ymm6,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 91 b4 fd 7b 00 00 00[ ]+vpgatherqd 0x7b\(%ebp,%zmm7,8\),%ymm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 91 b4 f5 7b 00 00 00[ ]+vpgatherqd 0x7b\(%ebp,%zmm6,8\),%ymm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 91 b4 fd 7b 00 00 00[ ]+vpgatherqq 0x7b\(%ebp,%zmm7,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 91 b4 f5 7b 00 00 00[ ]+vpgatherqq 0x7b\(%ebp,%zmm6,8\),%zmm6\{%k1\} #pass diff --git a/gas/testsuite/gas/i386/vgather-check-warn.e b/gas/testsuite/gas/i386/vgather-check-warn.e index 095840bb90f..efd2e0bde30 100644 --- a/gas/testsuite/gas/i386/vgather-check-warn.e +++ b/gas/testsuite/gas/i386/vgather-check-warn.e @@ -2,3 +2,11 @@ .*:6: Warning: .* .*:7: Warning: .* .*:8: Warning: .* +.*:12: Warning: .* +.*:14: Warning: .* +.*:16: Warning: .* +.*:18: Warning: .* +.*:20: Warning: .* +.*:22: Warning: .* +.*:24: Warning: .* +.*:26: Warning: .* diff --git a/gas/testsuite/gas/i386/vgather-check.d b/gas/testsuite/gas/i386/vgather-check.d index 25042f42237..c3505f9ac3d 100644 --- a/gas/testsuite/gas/i386/vgather-check.d +++ b/gas/testsuite/gas/i386/vgather-check.d @@ -11,4 +11,22 @@ Disassembly of section .text: [ ]*[a-f0-9]+:[ ]+c4 e2 69 92 14 48[ ]+vgatherdps %xmm2,\(%eax,%xmm1,2\),%xmm2 [ ]*[a-f0-9]+:[ ]+c4 e2 71 92 04 88[ ]+vgatherdps %xmm1,\(%eax,%xmm1,4\),%xmm0 [ ]*[a-f0-9]+:[ ]+c4 e2 69 92 0c c8[ ]+vgatherdps %xmm2,\(%eax,%xmm1,8\),%xmm1 + +00000018 : +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 92 b4 fd 7b 00 00 00[ ]+vgatherdpd 0x7b\(%ebp,%ymm7,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 92 b4 f5 7b 00 00 00[ ]+vgatherdpd 0x7b\(%ebp,%ymm6,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 92 b4 fd 7b 00 00 00[ ]+vgatherdps 0x7b\(%ebp,%zmm7,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 7d 49 92 b4 f5 7b 00 00 00[ ]+vgatherdps 0x7b\(%ebp,%zmm6,8\),%zmm6\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 f2 fd 49 93 b4 fd 7b 00 00 00[ ]+vgatherqpd 0x7b\(%ebp,%zmm7,8\),%zmm6\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/gas/testsuite/gas/i386/vgather-check.s b/gas/testsuite/gas/i386/vgather-check.s index c784029ece4..b2735e75e31 100644 --- a/gas/testsuite/gas/i386/vgather-check.s +++ b/gas/testsuite/gas/i386/vgather-check.s @@ -6,3 +6,21 @@ vgather: vgatherdps %xmm2,(%eax,%xmm1,2),%xmm2 vgatherdps %xmm1,(%eax,%xmm1,4),%xmm0 vgatherdps %xmm2,(%eax,%xmm1,8),%xmm1 + +avx512vgather: + vgatherdpd 123(%ebp,%ymm7,8), %zmm6{%k1} + vgatherdpd 123(%ebp,%ymm6,8), %zmm6{%k1} + vgatherdps 123(%ebp,%zmm7,8), %zmm6{%k1} + vgatherdps 123(%ebp,%zmm6,8), %zmm6{%k1} + vgatherqpd 123(%ebp,%zmm7,8), %zmm6{%k1} + vgatherqpd 123(%ebp,%zmm6,8), %zmm6{%k1} + vgatherqps 123(%ebp,%zmm7,8), %ymm6{%k1} + vgatherqps 123(%ebp,%zmm6,8), %ymm6{%k1} + vpgatherdd 123(%ebp,%zmm7,8), %zmm6{%k1} + vpgatherdd 123(%ebp,%zmm6,8), %zmm6{%k1} + vpgatherdq 123(%ebp,%ymm7,8), %zmm6{%k1} + vpgatherdq 123(%ebp,%ymm6,8), %zmm6{%k1} + vpgatherqd 123(%ebp,%zmm7,8), %ymm6{%k1} + vpgatherqd 123(%ebp,%zmm6,8), %ymm6{%k1} + vpgatherqq 123(%ebp,%zmm7,8), %zmm6{%k1} + vpgatherqq 123(%ebp,%zmm6,8), %zmm6{%k1} diff --git a/gas/testsuite/gas/i386/x86-64-vgather-check-error.l b/gas/testsuite/gas/i386/x86-64-vgather-check-error.l index d5c72059423..28fa82407c1 100644 --- a/gas/testsuite/gas/i386/x86-64-vgather-check-error.l +++ b/gas/testsuite/gas/i386/x86-64-vgather-check-error.l @@ -2,3 +2,11 @@ .*:6: Error: .* .*:8: Error: .* .*:10: Error: .* +.*:15: Error: .* +.*:17: Error: .* +.*:19: Error: .* +.*:21: Error: .* +.*:23: Error: .* +.*:25: Error: .* +.*:27: Error: .* +.*:29: Error: .* diff --git a/gas/testsuite/gas/i386/x86-64-vgather-check-none.d b/gas/testsuite/gas/i386/x86-64-vgather-check-none.d index e235e007384..a1062f77e14 100644 --- a/gas/testsuite/gas/i386/x86-64-vgather-check-none.d +++ b/gas/testsuite/gas/i386/x86-64-vgather-check-none.d @@ -14,4 +14,22 @@ Disassembly of section .text: [ ]*[a-f0-9]+:[ ]+c4 e2 31 92 04 88[ ]+vgatherdps %xmm9,\(%rax,%xmm1,4\),%xmm0 [ ]*[a-f0-9]+:[ ]+c4 e2 69 92 0c c8[ ]+vgatherdps %xmm2,\(%rax,%xmm1,8\),%xmm1 [ ]*[a-f0-9]+:[ ]+c4 62 69 92 0c c8[ ]+vgatherdps %xmm2,\(%rax,%xmm1,8\),%xmm9 + +000000000000002a : +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 92 84 cd 7b 00 00 00[ ]+vgatherdpd 0x7b\(%rbp,%ymm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 92 84 c5 7b 00 00 00[ ]+vgatherdpd 0x7b\(%rbp,%ymm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 92 84 cd 7b 00 00 00[ ]+vgatherdps 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 92 84 c5 7b 00 00 00[ ]+vgatherdps 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 93 84 cd 7b 00 00 00[ ]+vgatherqpd 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 93 84 c5 7b 00 00 00[ ]+vgatherqpd 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 93 84 cd 7b 00 00 00[ ]+vgatherqps 0x7b\(%rbp,%zmm17,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 93 84 c5 7b 00 00 00[ ]+vgatherqps 0x7b\(%rbp,%zmm16,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 90 84 cd 7b 00 00 00[ ]+vpgatherdd 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 90 84 c5 7b 00 00 00[ ]+vpgatherdd 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 90 84 cd 7b 00 00 00[ ]+vpgatherdq 0x7b\(%rbp,%ymm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 90 84 c5 7b 00 00 00[ ]+vpgatherdq 0x7b\(%rbp,%ymm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 91 84 cd 7b 00 00 00[ ]+vpgatherqd 0x7b\(%rbp,%zmm17,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 91 84 c5 7b 00 00 00[ ]+vpgatherqd 0x7b\(%rbp,%zmm16,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 91 84 cd 7b 00 00 00[ ]+vpgatherqq 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 91 84 c5 7b 00 00 00[ ]+vpgatherqq 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} #pass diff --git a/gas/testsuite/gas/i386/x86-64-vgather-check-warn.d b/gas/testsuite/gas/i386/x86-64-vgather-check-warn.d index 33846d25802..3d7a249113b 100644 --- a/gas/testsuite/gas/i386/x86-64-vgather-check-warn.d +++ b/gas/testsuite/gas/i386/x86-64-vgather-check-warn.d @@ -15,4 +15,22 @@ Disassembly of section .text: [ ]*[a-f0-9]+:[ ]+c4 e2 31 92 04 88[ ]+vgatherdps %xmm9,\(%rax,%xmm1,4\),%xmm0 [ ]*[a-f0-9]+:[ ]+c4 e2 69 92 0c c8[ ]+vgatherdps %xmm2,\(%rax,%xmm1,8\),%xmm1 [ ]*[a-f0-9]+:[ ]+c4 62 69 92 0c c8[ ]+vgatherdps %xmm2,\(%rax,%xmm1,8\),%xmm9 + +000000000000002a : +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 92 84 cd 7b 00 00 00[ ]+vgatherdpd 0x7b\(%rbp,%ymm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 92 84 c5 7b 00 00 00[ ]+vgatherdpd 0x7b\(%rbp,%ymm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 92 84 cd 7b 00 00 00[ ]+vgatherdps 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 92 84 c5 7b 00 00 00[ ]+vgatherdps 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 93 84 cd 7b 00 00 00[ ]+vgatherqpd 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 93 84 c5 7b 00 00 00[ ]+vgatherqpd 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 93 84 cd 7b 00 00 00[ ]+vgatherqps 0x7b\(%rbp,%zmm17,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 93 84 c5 7b 00 00 00[ ]+vgatherqps 0x7b\(%rbp,%zmm16,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 90 84 cd 7b 00 00 00[ ]+vpgatherdd 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 90 84 c5 7b 00 00 00[ ]+vpgatherdd 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 90 84 cd 7b 00 00 00[ ]+vpgatherdq 0x7b\(%rbp,%ymm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 90 84 c5 7b 00 00 00[ ]+vpgatherdq 0x7b\(%rbp,%ymm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 91 84 cd 7b 00 00 00[ ]+vpgatherqd 0x7b\(%rbp,%zmm17,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 91 84 c5 7b 00 00 00[ ]+vpgatherqd 0x7b\(%rbp,%zmm16,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 91 84 cd 7b 00 00 00[ ]+vpgatherqq 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 91 84 c5 7b 00 00 00[ ]+vpgatherqq 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} #pass diff --git a/gas/testsuite/gas/i386/x86-64-vgather-check-warn.e b/gas/testsuite/gas/i386/x86-64-vgather-check-warn.e index 24e6a578e9a..b17f423091f 100644 --- a/gas/testsuite/gas/i386/x86-64-vgather-check-warn.e +++ b/gas/testsuite/gas/i386/x86-64-vgather-check-warn.e @@ -2,3 +2,11 @@ .*:6: Warning: .* .*:8: Warning: .* .*:10: Warning: .* +.*:15: Warning: .* +.*:17: Warning: .* +.*:19: Warning: .* +.*:21: Warning: .* +.*:23: Warning: .* +.*:25: Warning: .* +.*:27: Warning: .* +.*:29: Warning: .* diff --git a/gas/testsuite/gas/i386/x86-64-vgather-check.d b/gas/testsuite/gas/i386/x86-64-vgather-check.d index bd8ce57ac02..d51f67076b4 100644 --- a/gas/testsuite/gas/i386/x86-64-vgather-check.d +++ b/gas/testsuite/gas/i386/x86-64-vgather-check.d @@ -14,4 +14,22 @@ Disassembly of section .text: [ ]*[a-f0-9]+:[ ]+c4 e2 31 92 04 88[ ]+vgatherdps %xmm9,\(%rax,%xmm1,4\),%xmm0 [ ]*[a-f0-9]+:[ ]+c4 e2 69 92 0c c8[ ]+vgatherdps %xmm2,\(%rax,%xmm1,8\),%xmm1 [ ]*[a-f0-9]+:[ ]+c4 62 69 92 0c c8[ ]+vgatherdps %xmm2,\(%rax,%xmm1,8\),%xmm9 + +000000000000002a : +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 92 84 cd 7b 00 00 00[ ]+vgatherdpd 0x7b\(%rbp,%ymm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 92 84 c5 7b 00 00 00[ ]+vgatherdpd 0x7b\(%rbp,%ymm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 92 84 cd 7b 00 00 00[ ]+vgatherdps 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 92 84 c5 7b 00 00 00[ ]+vgatherdps 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 93 84 cd 7b 00 00 00[ ]+vgatherqpd 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 93 84 c5 7b 00 00 00[ ]+vgatherqpd 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 93 84 cd 7b 00 00 00[ ]+vgatherqps 0x7b\(%rbp,%zmm17,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 93 84 c5 7b 00 00 00[ ]+vgatherqps 0x7b\(%rbp,%zmm16,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 90 84 cd 7b 00 00 00[ ]+vpgatherdd 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 90 84 c5 7b 00 00 00[ ]+vpgatherdd 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 90 84 cd 7b 00 00 00[ ]+vpgatherdq 0x7b\(%rbp,%ymm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 90 84 c5 7b 00 00 00[ ]+vpgatherdq 0x7b\(%rbp,%ymm16,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 91 84 cd 7b 00 00 00[ ]+vpgatherqd 0x7b\(%rbp,%zmm17,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 7d 41 91 84 c5 7b 00 00 00[ ]+vpgatherqd 0x7b\(%rbp,%zmm16,8\),%ymm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 91 84 cd 7b 00 00 00[ ]+vpgatherqq 0x7b\(%rbp,%zmm17,8\),%zmm16\{%k1\} +[ ]+[a-f0-9]+:[ ]+62 e2 fd 41 91 84 c5 7b 00 00 00[ ]+vpgatherqq 0x7b\(%rbp,%zmm16,8\),%zmm16\{%k1\} #pass diff --git a/gas/testsuite/gas/i386/x86-64-vgather-check.s b/gas/testsuite/gas/i386/x86-64-vgather-check.s index 43b058b6ca0..9d5872c8420 100644 --- a/gas/testsuite/gas/i386/x86-64-vgather-check.s +++ b/gas/testsuite/gas/i386/x86-64-vgather-check.s @@ -9,3 +9,21 @@ vgather: vgatherdps %xmm9,(%rax,%xmm1,4),%xmm0 vgatherdps %xmm2,(%rax,%xmm1,8),%xmm1 vgatherdps %xmm2,(%rax,%xmm1,8),%xmm9 + +avx512vgather: + vgatherdpd 123(%rbp,%ymm17,8), %zmm16{%k1} + vgatherdpd 123(%rbp,%ymm16,8), %zmm16{%k1} + vgatherdps 123(%rbp,%zmm17,8), %zmm16{%k1} + vgatherdps 123(%rbp,%zmm16,8), %zmm16{%k1} + vgatherqpd 123(%rbp,%zmm17,8), %zmm16{%k1} + vgatherqpd 123(%rbp,%zmm16,8), %zmm16{%k1} + vgatherqps 123(%rbp,%zmm17,8), %ymm16{%k1} + vgatherqps 123(%rbp,%zmm16,8), %ymm16{%k1} + vpgatherdd 123(%rbp,%zmm17,8), %zmm16{%k1} + vpgatherdd 123(%rbp,%zmm16,8), %zmm16{%k1} + vpgatherdq 123(%rbp,%ymm17,8), %zmm16{%k1} + vpgatherdq 123(%rbp,%ymm16,8), %zmm16{%k1} + vpgatherqd 123(%rbp,%zmm17,8), %ymm16{%k1} + vpgatherqd 123(%rbp,%zmm16,8), %ymm16{%k1} + vpgatherqq 123(%rbp,%zmm17,8), %zmm16{%k1} + vpgatherqq 123(%rbp,%zmm16,8), %zmm16{%k1} -- 2.30.2