]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
target-ppc: Correct Simple VSR LE Host Inversions
authorTom Musta <tommusta@gmail.com>
Mon, 31 Mar 2014 21:03:59 +0000 (16:03 -0500)
committerAlexander Graf <agraf@suse.de>
Tue, 8 Apr 2014 09:20:02 +0000 (11:20 +0200)
commitbcb7652e8dd185f2acc36fd2b9eb7b6dffcc8c47
tree92453a610272e55649c0b863e767ef6bed8fd9c0
parentd359db00e6dfaf12cbdedd30e36f879110d4f9d1
target-ppc: Correct Simple VSR LE Host Inversions

A common pattern in the VSX helper code macros is the use of "x.fld[i]" where
"x" is a VSR and "fld" is an argument to a macro ("f64" or "f32" is passed).
This is not always correct on LE hosts.

This change addresses all instances of this pattern to be "x.fld" where "fld" is:

  - "VsrD(0)" for scalar instructions accessing 64-bit numbers
  - "VsrD(i)" for vector instructions accessing 64-bit numbers
  - "VsrW(i)" for vector instructions accessing 32-bit numbers

Note that there are no instances of this pattern where a scalar instruction
accesses a 32-bit number.

Note also that it would be correct to use "VsrD(i)" for scalar instructions since
the loop index is only ever "0".  I have choosen to use "VsrD(0)" instead ... it
seems a little clearer.

Signed-off-by: Tom Musta <tommusta@gmail.com>
Tested-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/fpu_helper.c