From: David Gibson <david@gibson.dropbear.id.au>
To: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Cc: qemu-ppc@nongnu.org, thuth@redhat.com, qemu-devel@nongnu.org,
1643537@bugs.launchpad.net
Subject: Re: [Qemu-devel] [PATCH] target-ppc: fix index array of national digits
Date: Tue, 22 Nov 2016 10:03:55 +1100 [thread overview]
Message-ID: <20161121230355.GB8681@umbus.fritz.box> (raw)
In-Reply-To: <1479740113-26834-1-git-send-email-joserz@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]
On Mon, Nov 21, 2016 at 12:55:13PM -0200, 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>
Applied to ppc-for-2.8, thanks.
> ---
> 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
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-11-22 0:03 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
2016-11-21 23:03 ` David Gibson [this message]
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=20161121230355.GB8681@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=1643537@bugs.launchpad.net \
--cc=joserz@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.com \
/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).