qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org, Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] softfloat: Fix shift128Right for shift counts 64..127
Date: Mon, 03 Jun 2013 11:14:12 +0200	[thread overview]
Message-ID: <51AC5E64.3080002@redhat.com> (raw)
In-Reply-To: <1370186269-24353-1-git-send-email-peter.maydell@linaro.org>

Il 02/06/2013 17:17, Peter Maydell ha scritto:
> shift128Right would give the wrong result for a shift count
> between 64 and 127. This was never noticed because all of
> our uses of this function are guaranteed not to use shift
> counts in this range.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Found by code inspection. This contribution can be licensed
> under either the softfloat-2a or -2b license.
> 
>  fpu/softfloat-macros.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fpu/softfloat-macros.h b/fpu/softfloat-macros.h
> index b5164af..9b09545 100644
> --- a/fpu/softfloat-macros.h
> +++ b/fpu/softfloat-macros.h
> @@ -168,7 +168,7 @@ INLINE void
>          z0 = a0>>count;
>      }
>      else {
> -        z1 = ( count < 64 ) ? ( a0>>( count & 63 ) ) : 0;
> +        z1 = (count < 128) ? (a0 >> (count & 63)) : 0;
>          z0 = 0;
>      }
>      *z1Ptr = z1;
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

  reply	other threads:[~2013-06-03  9:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-02 15:17 [Qemu-devel] [PATCH] softfloat: Fix shift128Right for shift counts 64..127 Peter Maydell
2013-06-03  9:14 ` Paolo Bonzini [this message]
2013-06-10 21:48 ` Anthony Liguori

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=51AC5E64.3080002@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).