]> Git Repo - qemu.git/commit - target/i386/ops_sse.h
target/i386: fix phminposuw in-place operation
authorJoseph Myers <[email protected]>
Fri, 11 Aug 2017 14:23:35 +0000 (14:23 +0000)
committerPaolo Bonzini <[email protected]>
Tue, 19 Sep 2017 12:09:11 +0000 (14:09 +0200)
commitaa406feadfc5b095ca147ec56d6187c64be015a7
treeaed5629358a12e313bfdc126678306b1d1de27fb
parentae35eea7e4a9f21dd147406dfbcd0c4c6aaf2a60
target/i386: fix phminposuw in-place operation

The SSE4.1 phminposuw instruction finds the minimum 16-bit element in
the source vector, putting the value of that element in the low 16
bits of the destination vector, the index of that element in the next
three bits and zeroing the rest of the destination.  The helper for
this operation fills the destination from high to low, meaning that
when the source and destination are the same register, the minimum
source element can be overwritten before it is copied to the
destination.  This patch fixes it to fill the destination from low to
high instead, so the minimum source element is always copied first.
This fixes one gcc test failure in my GCC 6-based testing (and so
concludes the present sequence of patches, as I don't have any further
gcc test failures left in that testing that I attribute to QEMU bugs).

Signed-off-by: Joseph Myers <[email protected]>
Message-Id: <alpine.DEB.2.20.1708111422580[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
target/i386/ops_sse.h
This page took 0.023784 seconds and 4 git commands to generate.