x86emul/test: improve failure location identification for FMA sub-test

When some FMA set of insns is included in the base instruction set (XOP,
AVX512F, and AVX512-FP16 at present), simd_test() simply invokes
fma_test(), negating its return value. In case of a failure this would
yield a value close to 4G, which doesn't lend itself to easy
identification of the failing test case. Recognize the case in
simd_check_regs() and emit alternative output identifying FMA.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Jan Beulich committed 2022-06-23 09:38:58 +02:00
1 parent 65f684b728
commit 21b4d45bbf
1 file changed
+4 -1
+4 -1
View File
@@ -259,7 +259,10 @@ static bool simd_check_regs(const struct cpu_user_regs *regs)
{
if ( !regs->eax )
return true;
printf("[line %u] ", (unsigned int)regs->eax);
if ( (int)regs->eax > 0 )
printf("[line %u] ", (unsigned int)regs->eax);
else
printf("[FMA line %u] ", (unsigned int)-regs->eax);
return false;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.