diff options
author | Joseph Myers <joseph@codesourcery.com> | 2017-08-10 00:24:23 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-09-19 14:09:10 +0200 |
commit | 80e19606215d4df370dfe8fe21c558a129f00f0b (patch) | |
tree | 5ccef05842c903a802663c1f47f0c9b4ca84ed28 /linux-user/sh4 | |
parent | c6a8242915328cda0df0fbc0803da3448137e614 (diff) |
target/i386: fix packusdw in-place operation
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.
Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Message-Id: <alpine.DEB.2.20.1708100023050.9262@digraph.polyomino.org.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'linux-user/sh4')
0 files changed, 0 insertions, 0 deletions