aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-01-19 10:18:32 +0100
committerJan Beulich <jbeulich@suse.com>2024-01-19 10:18:32 +0100
commiteea4357967b6182459d423c4d919a7cb0219604b (patch)
tree4dc5a7e8206da788bc09c06871cc5975ae9ca5b4 /gas/testsuite
parent2519809009ed5e250ad9ed9b6184d9c45dba5029 (diff)
downloadgdb-eea4357967b6182459d423c4d919a7cb0219604b.zip
gdb-eea4357967b6182459d423c4d919a7cb0219604b.tar.gz
gdb-eea4357967b6182459d423c4d919a7cb0219604b.tar.bz2
x86/APX: VROUND{P,S}{S,D} can generally be encoded
VRNDSCALE{P,S}{S,D} is the AVX512 generalization of these AVX insns. As long as the immediate has the top 4 bits clear, they are equivalent to the earlier VEX-encoded insns, and hence can be used to permit use of eGPR-s in the memory operand. Since this is the normal way of using these insns, also alter the resulting diagnostic to complain about the immediate, not the eGPR use.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l8
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-egpr-inval.s8
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d4
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d4
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s4
5 files changed, 20 insertions, 8 deletions
diff --git a/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l b/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l
index 0472748..5cabe61 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l
+++ b/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l
@@ -187,10 +187,10 @@
.*:195: Error: extended GPR cannot be used as base/index for `vrcpps'
.*:196: Error: extended GPR cannot be used as base/index for `vrcpps'
.*:197: Error: extended GPR cannot be used as base/index for `vrcpss'
-.*:198: Error: extended GPR cannot be used as base/index for `vroundpd'
-.*:199: Error: extended GPR cannot be used as base/index for `vroundps'
-.*:200: Error: extended GPR cannot be used as base/index for `vroundsd'
-.*:201: Error: extended GPR cannot be used as base/index for `vroundss'
+.*:198: Error: .* 4 bits for `vroundpd'
+.*:199: Error: .* 4 bits for `vroundps'
+.*:200: Error: .* 4 bits for `vroundsd'
+.*:201: Error: .* 4 bits for `vroundss'
.*:202: Error: extended GPR cannot be used as base/index for `vrsqrtps'
.*:203: Error: extended GPR cannot be used as base/index for `vrsqrtps'
.*:204: Error: extended GPR cannot be used as base/index for `vrsqrtss'
diff --git a/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.s b/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.s
index fde038d..76f0a1b 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.s
+++ b/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.s
@@ -195,10 +195,10 @@
vrcpps (%r27),%xmm6
vrcpps (%r27),%ymm6
vrcpss (%r27),%xmm6,%xmm6
- vroundpd $1,(%r24),%xmm6
- vroundps $2,(%r24),%xmm6
- vroundsd $3,(%r24),%xmm6,%xmm3
- vroundss $4,(%r24),%xmm6,%xmm3
+ vroundpd $0x11,(%r24),%xmm6
+ vroundps $0x22,(%r24),%xmm6
+ vroundsd $0x33,(%r24),%xmm6,%xmm3
+ vroundss $0x44,(%r24),%xmm6,%xmm3
vrsqrtps (%r27),%xmm6
vrsqrtps (%r27),%ymm6
vrsqrtss (%r27),%xmm6,%xmm6
diff --git a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d
index 02e811d..354c85c 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d
+++ b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d
@@ -158,6 +158,10 @@ Disassembly of section \.text:
[ ]*[a-f0-9]+:[ ]*62 da 7f 08 4b b4 87 23 01 00 00[ ]+tileloadd tmm6,\[r31\+rax\*4\+0x123\]
[ ]*[a-f0-9]+:[ ]*62 da 7d 08 4b b4 87 23 01 00 00[ ]+tileloaddt1 tmm6,\[r31\+rax\*4\+0x123\]
[ ]*[a-f0-9]+:[ ]*62 da 7e 08 4b b4 87 23 01 00 00[ ]+tilestored[ ]+\[r31\+rax\*4\+0x123\],tmm6
+[ ]*[a-f0-9]+:[ ]*62 db fd 08 09 30 01[ ]+vrndscalepd xmm6,XMMWORD PTR \[r24\],(0x)?1
+[ ]*[a-f0-9]+:[ ]*62 db 7d 08 08 30 02[ ]+vrndscaleps xmm6,XMMWORD PTR \[r24\],(0x)?2
+[ ]*[a-f0-9]+:[ ]*62 db cd 08 0b 18 03[ ]+vrndscalesd xmm3,xmm6,QWORD PTR \[r24\],(0x)?3
+[ ]*[a-f0-9]+:[ ]*62 db 4d 08 0a 18 04[ ]+vrndscaless xmm3,xmm6,DWORD PTR \[r24\],(0x)?4
[ ]*[a-f0-9]+:[ ]*62 4c 7c 08 66 8c 87 23 01 00 00[ ]+wrssd[ ]+\[r31\+rax\*4\+0x123\],r25d
[ ]*[a-f0-9]+:[ ]*62 4c fc 08 66 bc 87 23 01 00 00[ ]+wrssq[ ]+\[r31\+rax\*4\+0x123\],r31
[ ]*[a-f0-9]+:[ ]*62 4c 7d 08 65 8c 87 23 01 00 00[ ]+wrussd[ ]+\[r31\+rax\*4\+0x123\],r25d
diff --git a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d
index 3a7dffc..a86fa60 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d
+++ b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d
@@ -158,6 +158,10 @@ Disassembly of section \.text:
[ ]*[a-f0-9]+:[ ]*62 da 7f 08 4b b4 87 23 01 00 00[ ]+tileloadd[ ]+0x123\(%r31,%rax,4\),%tmm6
[ ]*[a-f0-9]+:[ ]*62 da 7d 08 4b b4 87 23 01 00 00[ ]+tileloaddt1[ ]+0x123\(%r31,%rax,4\),%tmm6
[ ]*[a-f0-9]+:[ ]*62 da 7e 08 4b b4 87 23 01 00 00[ ]+tilestored[ ]+%tmm6,0x123\(%r31,%rax,4\)
+[ ]*[a-f0-9]+:[ ]*62 db fd 08 09 30 01[ ]+vrndscalepd \$0x1,\(%r24\),%xmm6
+[ ]*[a-f0-9]+:[ ]*62 db 7d 08 08 30 02[ ]+vrndscaleps \$0x2,\(%r24\),%xmm6
+[ ]*[a-f0-9]+:[ ]*62 db cd 08 0b 18 03[ ]+vrndscalesd \$0x3,\(%r24\),%xmm6,%xmm3
+[ ]*[a-f0-9]+:[ ]*62 db 4d 08 0a 18 04[ ]+vrndscaless \$0x4,\(%r24\),%xmm6,%xmm3
[ ]*[a-f0-9]+:[ ]*62 4c 7c 08 66 8c 87 23 01 00 00[ ]+wrssd[ ]+%r25d,0x123\(%r31,%rax,4\)
[ ]*[a-f0-9]+:[ ]*62 4c fc 08 66 bc 87 23 01 00 00[ ]+wrssq[ ]+%r31,0x123\(%r31,%rax,4\)
[ ]*[a-f0-9]+:[ ]*62 4c 7d 08 65 8c 87 23 01 00 00[ ]+wrussd[ ]+%r25d,0x123\(%r31,%rax,4\)
diff --git a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s
index 39752c2..ac536d3 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s
+++ b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s
@@ -152,6 +152,10 @@ _start:
tileloadd 0x123(%r31,%rax,4),%tmm6
tileloaddt1 0x123(%r31,%rax,4),%tmm6
tilestored %tmm6,0x123(%r31,%rax,4)
+ vroundpd $1,(%r24),%xmm6
+ vroundps $2,(%r24),%xmm6
+ vroundsd $3,(%r24),%xmm6,%xmm3
+ vroundss $4,(%r24),%xmm6,%xmm3
wrssd %r25d,0x123(%r31,%rax,4)
wrssq %r31,0x123(%r31,%rax,4)
wrussd %r25d,0x123(%r31,%rax,4)