From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8yYq-0007L5-Fg for qemu-devel@nongnu.org; Mon, 21 Nov 2016 19:03:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8yYp-00085g-D6 for qemu-devel@nongnu.org; Mon, 21 Nov 2016 19:03:44 -0500 Date: Tue, 22 Nov 2016 10:03:55 +1100 From: David Gibson Message-ID: <20161121230355.GB8681@umbus.fritz.box> References: <1479740113-26834-1-git-send-email-joserz@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4bRzO86E/ozDv8r1" Content-Disposition: inline In-Reply-To: <1479740113-26834-1-git-send-email-joserz@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH] target-ppc: fix index array of national digits List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jose Ricardo Ziviani Cc: qemu-ppc@nongnu.org, thuth@redhat.com, qemu-devel@nongnu.org, 1643537@bugs.launchpad.net --4bRzO86E/ozDv8r1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Jose Ricardo Ziviani Applied to ppc-for-2.8, thanks. > --- > target-ppc/int_helper.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > 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] =3D val; > + reg->u16[7 - n] =3D val; > #else > reg->u16[n] =3D val; > #endif --=20 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 --4bRzO86E/ozDv8r1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYM31YAAoJEGw4ysog2bOSrNEQALMcQ6QEgDlbLWxgWWzZdUzM qfUBQF1fbASBQCCYkf1QixrNuxOcuhwiB4fG406EBRSZYVndZYbuIAcYXPrNREae NKQjcc+SvKvXEXdtuFndrItOY/zx4qmvqNYSsiW9w5easHPOWdum7Wk7UYZYKJoQ 9gckMo/enXKxhGo9rX6u46impbONznnNrzfc2d54SPllLs5dRp/KL7L/P1akyvdH u1lMTxsaKte7LQ1+I4ObtI+gfZfBIet3Tz9WdUrY8doihK+caN2Cf0ZoQRF7yS7T p0PZ2Dzt57y3EP0ekxk+GtfwdkfUbxDdQRG3qYCkJxvuZblaX1M/SHKthRWf0Wz9 kYw8F/tob9iboHMAEoSQEzuWCj9K4CelTJr84GL5kVZFlpCrn6yj/GCfVefmpUPV WsZQ4i4rlbOyncLGYlyAr6ernuECK2ZpyipxtFmYmnue+qoO3Xw9gkw9TEpr4FvO YNxfFALriK0Vlva+Jsnps02IcDoPGR6pNWZ/EQO4OW080psh/o33sC89HYyt4Ivo G6h6Mu+1hci0Tm+3Yp1HS3z5tsc4hhCc0YDrb5RYr9klUombDHpWj42sr2jCA6ay nE2s2hDaOofZ4Dfsmq0yOD8UdHbUBdgxcwosNas4Fvd7tw5tUR/LefeJ0akDdAq1 jhsjPnAUyHgn7nl/XCr6 =GtVB -----END PGP SIGNATURE----- --4bRzO86E/ozDv8r1--