qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>, qemu-ppc@nongnu.org
Cc: david@gibson.dropbear.id.au, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-ppc: fix index array of national digits
Date: Mon, 21 Nov 2016 16:05:51 +0100	[thread overview]
Message-ID: <b03ccb7d-7cff-48db-d373-23e0563f94c1@redhat.com> (raw)
In-Reply-To: <1479740113-26834-1-git-send-email-joserz@linux.vnet.ibm.com>

On 21.11.2016 15:55, Jose Ricardo Ziviani wrote:
> Fixes the big endian array access of national digits, from commits
> b815587 and e2106d7.
> 
> Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
> ---
>  target-ppc/int_helper.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
> index 9ac204a..2d57c9a 100644
> --- a/target-ppc/int_helper.c
> +++ b/target-ppc/int_helper.c
> @@ -2572,7 +2572,7 @@ static int bcd_cmp_zero(ppc_avr_t *bcd)
>  static uint16_t get_national_digit(ppc_avr_t *reg, int n)
>  {
>  #if defined(HOST_WORDS_BIGENDIAN)
> -    return reg->u16[8 - n];
> +    return reg->u16[7 - n];
>  #else
>      return reg->u16[n];
>  #endif
> @@ -2581,7 +2581,7 @@ static uint16_t get_national_digit(ppc_avr_t *reg, int n)
>  static void set_national_digit(ppc_avr_t *reg, uint8_t val, int n)
>  {
>  #if defined(HOST_WORDS_BIGENDIAN)
> -    reg->u16[8 - n] = val;
> +    reg->u16[7 - n] = val;
>  #else
>      reg->u16[n] = val;
>  #endif
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>

  reply	other threads:[~2016-11-21 15:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 14:55 [Qemu-devel] [PATCH] target-ppc: fix index array of national digits Jose Ricardo Ziviani
2016-11-21 15:05 ` Thomas Huth [this message]
2016-11-21 23:03 ` David Gibson

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=b03ccb7d-7cff-48db-d373-23e0563f94c1@redhat.com \
    --to=thuth@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=joserz@linux.vnet.ibm.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).