]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86: KeyLocker insn interaction with -msse-check / .sse_check
authorJan Beulich <jbeulich@suse.com>
Mon, 11 Mar 2024 07:23:45 +0000 (08:23 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 11 Mar 2024 07:23:45 +0000 (08:23 +0100)
Some of these have no explicit %xmm operand(s), yet they still act SSE-
like (in leaveing bits 128 and up untouched). Hence they want similarly
diagnosing, if that was asked for.

gas/config/tc-i386.c
gas/testsuite/gas/i386/sse-check-error.l
gas/testsuite/gas/i386/sse-check-warn.e
gas/testsuite/gas/i386/sse-check.d
gas/testsuite/gas/i386/sse-check.s
gas/testsuite/gas/i386/x86-64-sse-check-error.l

index 8790e1b8b591429598d3dc0ce4271ce5aae6877a..85dc79f7a1c1bad106b043ade4227cee2f5a7eb1 100644 (file)
@@ -6761,7 +6761,8 @@ md_assemble (char *line)
       && !is_cpu (&i.tm, CpuSSE4a)
       && !is_any_vex_encoding (t))
     {
-      bool simd = false;
+      /* Some KL and all WideKL insns have only implicit %xmm operands.  */
+      bool simd = is_cpu (t, CpuKL) || is_cpu (t, CpuWideKL);
 
       for (j = 0; j < t->operands; ++j)
        {
index da22c3bc3e63a7ad591196cbd80915c20d8ccdcf..2b5fd1e5ea4d0541013f2bc5677f1ce449c12e30 100644 (file)
@@ -10,6 +10,9 @@
 .*:33: Error: .*
 .*:36: Error: .*
 .*:39: Error: .*
+.*:44: Error: .*
+.*:45: Error: .*
+.*:48: Error: .*
 GAS LISTING .*
 
 
@@ -78,4 +81,17 @@ GAS LISTING .*
 [      ]*[0-9]+[       ]+CFC0
 [      ]*[0-9]+[       ]+\?\?\?\? 62F27D48             vgf2p8mulb %zmm0, %zmm0, %zmm0
 [      ]*[0-9]+[       ]+CFC0
-
+[      ]*[0-9]+[       ]+
+[      ]*[0-9]+[       ]+\# KeyLocker instructions
+[      ]*[0-9]+[       ]+\?\?\?\? F30F38DD             aesdec128kl \(%eax\), %xmm0
+.*  Error: SSE instruction `aesdec128kl' is used
+[      ]*[0-9]+[       ]+00
+[      ]*[0-9]+[       ]+\?\?\?\? F30F38FA             encodekey128 %eax, %edi
+.*  Error: SSE instruction `encodekey128' is used
+[      ]*[0-9]+[       ]+F8
+[      ]*[0-9]+[       ]+
+[      ]*[0-9]+[       ]+\# WideKL instructions
+[      ]*[0-9]+[       ]+\?\?\?\? F30F38D8             aesencwide256kl \(%eax\)
+.*  Error: SSE instruction `aesencwide256kl' is used
+[      ]*[0-9]+[       ]+10
+#pass
index af7f902275eb7f6f2b2c6db63a050684a1f046ad..e98bdd14e1f0bb4c3599d61c9ea8a9c91ac79857 100644 (file)
@@ -10,3 +10,6 @@
 .*:33: Warning: SSE instruction `aesdec' is used
 .*:36: Warning: SSE instruction `sha1nexte' is used
 .*:39: Warning: SSE instruction `gf2p8mulb' is used
+.*:44: Warning: SSE instruction `aesdec128kl' is used
+.*:45: Warning: SSE instruction `encodekey128' is used
+.*:48: Warning: SSE instruction `aesencwide256kl' is used
index adc0b1f5d9a10d7ee6c03e28c36ad40b0cc0ffad..2e04cf2554dca0c08c48320f27c14dcbfc047e03 100644 (file)
@@ -22,4 +22,7 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    66 0f 38 cf d1          gf2p8mulb %xmm1,%xmm2
 [      ]*[a-f0-9]+:    62 f2 7d 09 cf c0       vgf2p8mulb %xmm0,%xmm0,%xmm0\{%k1\}
 [      ]*[a-f0-9]+:    62 f2 7d 48 cf c0       vgf2p8mulb %zmm0,%zmm0,%zmm0
+[      ]*[a-f0-9]+:    (67 )?f3 0f 38 dd 00 +  aesdec128kl \(%eax\),%xmm0
+[      ]*[a-f0-9]+:    f3 0f 38 fa f8          encodekey128 %eax,%edi
+[      ]*[a-f0-9]+:    (67 )?f3 0f 38 d8 10 +  aesencwide256kl \(%eax\)
 #pass
index 6536a8644d083504215d531289099b7948562a61..001beebea537746f93dfb4787645270994367b87 100644 (file)
@@ -39,3 +39,10 @@ _start:
        gf2p8mulb %xmm1,%xmm2
        vgf2p8mulb %xmm0, %xmm0, %xmm0{%k1}
        vgf2p8mulb %zmm0, %zmm0, %zmm0
+
+# KeyLocker instructions
+       aesdec128kl (%eax), %xmm0
+       encodekey128 %eax, %edi
+
+# WideKL instructions
+       aesencwide256kl (%eax)
index 0b285373ac20f086794437175d6d7381cf7986ac..efd32e393f0f07cf677344cc0783437779e06bf2 100644 (file)
@@ -10,6 +10,9 @@
 .*:33: Error: .*
 .*:36: Error: .*
 .*:39: Error: .*
+.*:44: Error: .*
+.*:45: Error: .*
+.*:48: Error: .*
 GAS LISTING .*
 
 
@@ -79,4 +82,17 @@ GAS LISTING .*
 [      ]*[0-9]+[       ]+CFC0
 [      ]*[0-9]+[       ]+\?\?\?\? 62F27D48             vgf2p8mulb %zmm0, %zmm0, %zmm0
 [      ]*[0-9]+[       ]+CFC0
-
+[      ]*[0-9]+[       ]+
+[      ]*[0-9]+[       ]+\# KeyLocker instructions
+[      ]*[0-9]+[       ]+\?\?\?\? 67F30F38             aesdec128kl \(%eax\), %xmm0
+.*  Error: SSE instruction `aesdec128kl' is used
+[      ]*[0-9]+[       ]+DD00
+[      ]*[0-9]+[       ]+\?\?\?\? F30F38FA             encodekey128 %eax, %edi
+.*  Error: SSE instruction `encodekey128' is used
+[      ]*[0-9]+[       ]+F8
+[      ]*[0-9]+[       ]+
+[      ]*[0-9]+[       ]+\# WideKL instructions
+[      ]*[0-9]+[       ]+\?\?\?\? 67F30F38             aesencwide256kl \(%eax\)
+.*  Error: SSE instruction `aesencwide256kl' is used
+[      ]*[0-9]+[       ]+D810
+#pass