diff mbox series

x86emul/test: fix build with gas 2.43

Message ID 2354c8ca-da3e-4552-ae3b-0cfc3c416571@suse.com (mailing list archive)
State New
Headers show
Series x86emul/test: fix build with gas 2.43 | expand

Commit Message

Jan Beulich Sept. 5, 2024, 1:17 p.m. UTC
Drop explicit {evex} pseudo-prefixes. New gas (validly) complains when
they're used on other than instructions. Our use was potentially ahead
of macro invocations - see simd.h's "override" macro.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Andrew Cooper Sept. 5, 2024, 1:20 p.m. UTC | #1
On 05/09/2024 2:17 pm, Jan Beulich wrote:
> Drop explicit {evex} pseudo-prefixes. New gas (validly) complains when
> they're used on other than instructions.

"other than" like this is awkward grammar.  "things other than
instructions" would be better.

>  Our use was potentially ahead
> of macro invocations - see simd.h's "override" macro.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox series

Patch

--- a/tools/tests/x86_emulator/simd.c
+++ b/tools/tests/x86_emulator/simd.c
@@ -333,7 +333,7 @@  static inline vec_t movlhps(vec_t x, vec
 # if FLOAT_SIZE == 4
 #  define broadcast(x) ({ \
     vec_t t_; \
-    asm ( "%{evex%} vbroadcastss %1, %0" \
+    asm ( "vbroadcastss %1, %0" \
           : "=v" (t_) : "m" (*(float[1]){ x }) ); \
     t_; \
 })
@@ -401,14 +401,14 @@  static inline vec_t movlhps(vec_t x, vec
 #  if VEC_SIZE >= 32
 #   define broadcast(x) ({ \
     vec_t t_; \
-    asm ( "%{evex%} vbroadcastsd %1, %0" : "=v" (t_) \
+    asm ( "vbroadcastsd %1, %0" : "=v" (t_) \
           : "m" (*(double[1]){ x }) ); \
     t_; \
 })
 #  else
 #   define broadcast(x) ({ \
     vec_t t_; \
-    asm ( "%{evex%} vpbroadcastq %1, %0" \
+    asm ( "vpbroadcastq %1, %0" \
           : "=v" (t_) : "m" (*(double[1]){ x }) ); \
     t_; \
 })
@@ -601,7 +601,7 @@  static inline vec_t movlhps(vec_t x, vec
 # if INT_SIZE == 4 || UINT_SIZE == 4
 #  define broadcast(x) ({ \
     vec_t t_; \
-    asm ( "%{evex%} vpbroadcastd %1, %0" \
+    asm ( "vpbroadcastd %1, %0" \
           : "=v" (t_) : "m" (*(int[1]){ x }) ); \
     t_; \
 })
@@ -649,7 +649,7 @@  static inline vec_t movlhps(vec_t x, vec
 # elif INT_SIZE == 8 || UINT_SIZE == 8
 #  define broadcast(x) ({ \
     vec_t t_; \
-    asm ( "%{evex%} vpbroadcastq %1, %0" \
+    asm ( "vpbroadcastq %1, %0" \
           : "=v" (t_) : "m" (*(long long[1]){ x }) ); \
     t_; \
 })
@@ -716,7 +716,7 @@  static inline vec_t movlhps(vec_t x, vec
 # if INT_SIZE == 1 || UINT_SIZE == 1
 #  define broadcast(x) ({ \
     vec_t t_; \
-    asm ( "%{evex%} vpbroadcastb %1, %0" \
+    asm ( "vpbroadcastb %1, %0" \
           : "=v" (t_) : "m" (*(char[1]){ x }) ); \
     t_; \
 })
@@ -745,7 +745,7 @@  static inline vec_t movlhps(vec_t x, vec
 # elif INT_SIZE == 2 || UINT_SIZE == 2
 #  define broadcast(x) ({ \
     vec_t t_; \
-    asm ( "%{evex%} vpbroadcastw %1, %0" \
+    asm ( "vpbroadcastw %1, %0" \
           : "=v" (t_) : "m" (*(short[1]){ x }) ); \
     t_; \
 })