]> git.ipfire.org Git - thirdparty/valgrind.git/commit
CVTPI2PD (which converts 2 x I32 in M64 or MMX to 2 x F64 in XMM):
authorJulian Seward <jseward@acm.org>
Sun, 21 Feb 2010 20:40:53 +0000 (20:40 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 21 Feb 2010 20:40:53 +0000 (20:40 +0000)
commit22111b3f3ec8466b6eb95027fa3650bbafb28e1d
tree4f975561334dfb80f8477fbe630fa9d84e531fa7
parentd7fb9137ca844ca4d1ffff27a077fcdbcd9f7a9b
CVTPI2PD (which converts 2 x I32 in M64 or MMX to 2 x F64 in XMM):
only switch the x87 FPU to MMX mode in the case where the source
operand is in memory, not in an MMX register.  This fixes #210264.

This is all very fishy.

* it's inconsistent with all other instructions which convert between
  values in (MMX or M64) and XMM, in that they put the FPU in MMX mode
  even if the source is memory, not MMX.  (for example, CVTPI2PS).
  At least, that's what the Intel docs appear to say.

* the AMD documentation makes no mention at all of this.  For example
  it makes no differentiation in this matter between CVTPI2PD and
  CVTPI2PS.

I wonder if Intel surreptitiously changed the behaviour of CVTPI2PD
since this code was written circa 5 years ago.  Or, whether the Intel
and AMD implementations differ in this respect.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1961
VEX/priv/guest_amd64_toIR.c
VEX/priv/guest_x86_toIR.c