Skip to contentSkip to conversation

x86emul: correct {evex} assembler capability check

PATCH In review Jan Beulich 2 participants 2 messages May 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86emul: correct {evex} assembler capability check

The {evex} pseudo prefix gets rejected by gas for insns not allowing EVEX encoding. Except there's a gas bug due to which its check gets bypassed for insns without operands. Let's not rely on that bug to remain there.

tools/tests/x86_emulator/Makefile +1 -1
@@ -112,7 +112,7 @@ $(foreach flavor,$(SIMD) $(FMA),$(eval $
 
 # Also explicitly check for {evex} pseudo-prefix support, which got introduced
 # only after AVX512F and some of its extensions.
-TARGET-$(shell echo 'asm("{evex} vzeroall");' | $(CC) -x c -c -o /dev/null - || echo y) :=
+TARGET-$(shell echo 'asm("{evex} vmovaps %xmm0$(comma)%xmm0");' | $(CC) -x c -c -o /dev/null - || echo y) :=
 
 ifeq ($(TARGET-y),)
 $(warning Test harness not built, use newer compiler than "$(CC)" (version $(shell $(CC) -dumpversion)) and an "{evex}" capable assembler)