Fix SIMD Scalar Move Encoding: VEX.L should be 0
authorLi Tian <litian2025@gmail.com>
Mon, 28 Nov 2016 22:48:01 +0000 (14:48 -0800)
committerLi Tian <litian2025@gmail.com>
Wed, 14 Dec 2016 23:22:25 +0000 (15:22 -0800)
commitbb67edaf7c21c9b82d33e2958ca22de75e238d7c
treeecb7b996fb94c43e9d0cb75e7b53c46917b96ed0
parent4fb0c3e3cff61c09a5ec745b354e3219607295a3
Fix SIMD Scalar Move Encoding: VEX.L should be 0

For SIMD Scalar Move instructions such as vmovlpd, vmovlps, vmovhps,
vmovhps and vmovss on AVX system, JIT should ensure that those
instructions are encoded with VEX.L=0, because encoding them with
VEX.L=1 may encounter unpredictable behavior across different
processor generations. The reason of VEX.L is encoded with 1 is
because JIT calls compiler->getSIMDVectorType() which returns
EA_32BYTE, and it is been passed into emitter AddVexPrefix() which
ends up encoded VEX.L=1, the fix is to pass target type and base
type for those instructions to ensure that VEX.L=0 at emitter
AddVexPrefix()

Fix #8328
src/jit/codegenlinear.h
src/jit/simdcodegenxarch.cpp