mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-24 01:55:34 +00:00
59df0bae12
The SSE4.1 packusdw instruction combines source and destination vectors of signed 32-bit integers into a single vector of unsigned 16-bit integers, with unsigned saturation. When the source and destination are the same register, this means each 32-bit element of that register is used twice as an input, to produce two of the 16-bit output elements, and so if the operation is carried out element-by-element in-place, no matter what the order in which it is applied to the elements, the first element's operation will overwrite some future input. The helper for packssdw avoids this issue by computing the result in a local temporary and copying it to the destination at the end; this patch fixes the packusdw helper to do likewise. This fixes three gcc test failures in my GCC 6-based testing. Backports commit 80e19606215d4df370dfe8fe21c558a129f00f0b from qemu |
||
---|---|---|
.. | ||
arm | ||
i386 | ||
m68k | ||
mips | ||
sparc |