* [Qemu-devel] [PATCH] target-ppc: fix index array of national digits
@ 2016-11-21 14:55 Jose Ricardo Ziviani
2016-11-21 15:05 ` Thomas Huth
2016-11-21 23:03 ` David Gibson
0 siblings, 2 replies; 3+ messages in thread
From: Jose Ricardo Ziviani @ 2016-11-21 14:55 UTC (permalink / raw)
To: qemu-ppc; +Cc: david, thuth, qemu-devel, 1643537
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
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] target-ppc: fix index array of national digits
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
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2016-11-21 15:05 UTC (permalink / raw)
To: Jose Ricardo Ziviani, qemu-ppc; +Cc: david, qemu-devel
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] target-ppc: fix index array of national digits
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
1 sibling, 0 replies; 3+ messages in thread
From: David Gibson @ 2016-11-21 23:03 UTC (permalink / raw)
To: Jose Ricardo Ziviani; +Cc: qemu-ppc, thuth, qemu-devel, 1643537
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-22 0:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).