]> git.ipfire.org Git - thirdparty/valgrind.git/commit
The Power ISA 2.07 document includes a correction to the description for the
authorCarl Love <cel@us.ibm.com>
Thu, 12 Sep 2013 17:26:42 +0000 (17:26 +0000)
committerCarl Love <cel@us.ibm.com>
Thu, 12 Sep 2013 17:26:42 +0000 (17:26 +0000)
commitdcfd5056dd763a4e29f61ab4840a333da5adae0a
tree1c4ce51ee511bd3321fc96e6ef05d901a9b47cce
parent8d54830112f9afce023943bd7d33ca7694d504b7
The Power ISA 2.07 document includes a correction to the description for the
behavior of the xscvspdp instruction, indicating that if the source argument
is a SNaN, it is first changed to a QNaN before being converted from
single-precision to double-precision. This updated information about the
xscvspdp instruction exposed a bug in the VEX implementation for that
instruction and also a bug in the testing for all instructions having
special behavior for single-precision SNaN arguments.

This patch fixes both the VEX bug in xscvspdp implementation:
The current implementation of xscvspdp emulates the instruction by
extracting the single-precision floating point from the vector register,
storing it in single-prcision, and then loading the data just stored using
the lfsx instruction. But the lfsx instruction does not change SNaN input
arguments to QNaN inputs before conversion to double-precision, so this
emulation is not sufficient for the xscvspdp instruction as described in the
current documentation. This patch fixes that issue by recognizing a SNaN input
and changing it to a QNaN before performing the emulation using lfsx.
While fixing the bug in xscvspdp implementation, it was also discovered that
xvcvspdp had the same issue where SNaN inputs were not being handled correctly,
so this patch also fixes its implementation, too

See bugzilla 324816.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2760
VEX/priv/guest_ppc_toIR.c