qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tom Musta <tommusta@gmail.com>
To: qemu-devel@nongnu.org
Cc: Tom Musta <tommusta@gmail.com>, qemu-ppc@nongnu.org
Subject: [Qemu-devel] [PATCH 0/9] target-ppc: VSX Bug Fixes
Date: Wed, 26 Mar 2014 15:45:45 -0500	[thread overview]
Message-ID: <1395866754-18673-1-git-send-email-tommusta@gmail.com> (raw)

This patch series addresses bugs in the recently added VSX instructions.  Two general
defects are fixed:

  (1) The VSX Convert to Integer instructions truncate the source floating point
      number to an integer value and hence should use a round-to-zero rounding
      algorithm.  The existing implementation erroneously uses the rounding 
      mode as set by the FPSCR.

      This patch was previously published separately (see discussion at 
      http://lists.nongnu.org/archive/html/qemu-devel/2014-03/msg04526.html).

  (2) There is a pervasive problem with the VSX helpers on Little Endian hosts.
      The bug can be seen when using a mixture of VSRs in the upper and lower
      regions of VSR (i.e. a mixture of VSR 0-31, which overlay the Floating
      Point register array, and VSR 32-64 which overlay the Altivec AVR array).
      This patch series introduces VSR field accessors that are consistent with 
      the Power ISA notation irrespective of host endianness.  The VSX instruction 
      macros are updated to use these accessors.

      For example, the Power ISA has pictures like this, describing a VSR:

          0          32         64         96       127
          +----------+----------+----------+----------+
          | .word[0] | .word[1] | .word[2] | .word[3] |
          +----------+----------+----------+----------+

      The updated code will now refer to .word[0] as v->VsrW(0), .word[1]
      as v->VsrW(1), and so on.

      This change makes the code correct and also more consistent with the ISA
      document.     

Tom Musta (9):
  softfloat: Introduce float32_to_uint64_round_to_zero
  target-ppc: Bug: VSX Convert to Integer Should Truncate
  target-ppc: Define Endian-Correct Accessors for VSR Field Acess
  target-ppc: Correct LE Host Inversion of Lower VSRs
  target-ppc: Correct Simple VSR LE Host Inversions
  target-ppc: Correct VSX Scalar Compares
  target-ppc: Correct VSX FP to FP Conversions
  target-ppc: Correct VSX FP to Integer Conversion
  target-ppc: Correct VSX Integer to FP Conversion

 fpu/softfloat.c         |   54 +++++
 include/fpu/softfloat.h |    1 +
 target-ppc/fpu_helper.c |  494 +++++++++++++++++++++++------------------------
 3 files changed, 298 insertions(+), 251 deletions(-)

             reply	other threads:[~2014-03-26 20:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26 20:45 Tom Musta [this message]
2014-03-26 20:45 ` [Qemu-devel] [PATCH 1/9] softfloat: Introduce float32_to_uint64_round_to_zero Tom Musta
2014-03-31 17:26   ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2014-03-31 17:48   ` [Qemu-devel] " Peter Maydell
2014-03-31 18:07     ` Tom Musta
2014-03-31 18:12       ` Peter Maydell
2014-03-26 20:45 ` [Qemu-devel] [PATCH 2/9] target-ppc: Bug: VSX Convert to Integer Should Truncate Tom Musta
2014-03-26 20:45 ` [Qemu-devel] [PATCH 3/9] target-ppc: Define Endian-Correct Accessors for VSR Field Acess Tom Musta
2014-03-26 20:45 ` [Qemu-devel] [PATCH 4/9] target-ppc: Correct LE Host Inversion of Lower VSRs Tom Musta
2014-03-26 20:45 ` [Qemu-devel] [PATCH 5/9] target-ppc: Correct Simple VSR LE Host Inversions Tom Musta
2014-03-26 20:45 ` [Qemu-devel] [PATCH 6/9] target-ppc: Correct VSX Scalar Compares Tom Musta
2014-03-26 20:45 ` [Qemu-devel] [PATCH 7/9] target-ppc: Correct VSX FP to FP Conversions Tom Musta
2014-03-26 20:45 ` [Qemu-devel] [PATCH 8/9] target-ppc: Correct VSX FP to Integer Conversion Tom Musta
2014-03-26 20:45 ` [Qemu-devel] [PATCH 9/9] target-ppc: Correct VSX Integer to FP Conversion Tom Musta
2014-03-28  3:49 ` [Qemu-devel] [PATCH 0/9] target-ppc: VSX Bug Fixes Anton Blanchard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395866754-18673-1-git-send-email-tommusta@gmail.com \
    --to=tommusta@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).