diff options
author | Roman Kapl | 2018-08-24 15:17:34 +0200 |
---|---|---|
committer | Richard Henderson | 2018-09-26 18:02:51 +0200 |
commit | 93bf9a42733321fb632bcb9eafd049ef0e3d9417 (patch) | |
tree | 95fccf44cfe5788ef49f69a346b16ef0102669dc /include/qemu/compiler.h | |
parent | qht-bench: add -p flag to precompute hash values (diff) | |
download | qemu-93bf9a42733321fb632bcb9eafd049ef0e3d9417.tar.gz qemu-93bf9a42733321fb632bcb9eafd049ef0e3d9417.tar.xz qemu-93bf9a42733321fb632bcb9eafd049ef0e3d9417.zip |
tcg/i386: fix vector operations on 32-bit hosts
The TCG backend uses LOWREGMASK to get the low 3 bits of register numbers.
This was defined as no-op for 32-bit x86, with the assumption that we have
eight registers anyway. This assumption is not true once we have xmm regs.
Since LOWREGMASK was a no-op, xmm register indidices were wrong in opcodes
and have overflown into other opcode fields, wreaking havoc.
To trigger these problems, you can try running the "movi d8, #0x0" AArch64
instruction on 32-bit x86. "vpxor %xmm0, %xmm0, %xmm0" should be generated,
but instead TCG generated "vpxor %xmm0, %xmm0, %xmm2".
Fixes: 770c2fc7bb ("Add vector operations")
Signed-off-by: Roman Kapl <rka@sysgo.com>
Message-Id: <20180824131734.18557-1-rka@sysgo.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/qemu/compiler.h')
0 files changed, 0 insertions, 0 deletions