Received: from eggs.gnu.org ([140.186.70.92]:36428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9Bjm-00088j-4P for qemu-devel@nongnu.org; Thu, 29 Sep 2011 04:12:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9Bjk-00033j-Qn for qemu-devel@nongnu.org; Thu, 29 Sep 2011 04:12:58 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:34887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9Bjk-00033H-Lu for qemu-devel@nongnu.org; Thu, 29 Sep 2011 04:12:56 -0400 Received: from ucsinet23.oracle.com (ucsinet23.oracle.com [156.151.31.71]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p8T8Cpp5028067 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 29 Sep 2011 08:12:53 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet23.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p8T8CoNp011658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 29 Sep 2011 08:12:51 GMT Received: from abhmt114.oracle.com (abhmt114.oracle.com [141.146.116.66]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p8T8CjLm017403 for ; Thu, 29 Sep 2011 03:12:45 -0500 From: Frank Mehnert Date: Thu, 29 Sep 2011 10:12:37 +0200 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2795203.4xM0uoHW8a"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201109291012.42032.frank.mehnert@oracle.com> Subject: [Qemu-devel] Bug in helper_pcmpestrm and helper_pcmpistrm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --nextPart2795203.4xM0uoHW8a Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, the two functions helper_pcmpestrm() and helper_pcmpistrm() in target-i386/ops_sse.h contain obviously typos. I think that at all 4 marked places should increment the index 'i', not decrement it during the loop: void glue(helper_pcmpestrm, SUFFIX) (Reg *d, Reg *s, uint32_t ctrl) { int i; unsigned int res =3D pcmpxstrx(d, s, ctrl, pcmp_elen(R_EDX, ctrl), pcmp_elen(R_EAX, ctrl)); if ((ctrl >> 6) & 1) { if (ctrl & 1) for (i =3D 0; i <=3D 8; i--, res >>=3D 1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ d->W(i) =3D (res & 1) ? ~0 : 0; else for (i =3D 0; i <=3D 16; i--, res >>=3D 1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ d->B(i) =3D (res & 1) ? ~0 : 0; } else { d->Q(1) =3D 0; d->Q(0) =3D res; } } void glue(helper_pcmpistrm, SUFFIX) (Reg *d, Reg *s, uint32_t ctrl) { int i; unsigned int res =3D pcmpxstrx(d, s, ctrl, pcmp_ilen(s, ctrl), pcmp_ilen(d, ctrl)); if ((ctrl >> 6) & 1) { if (ctrl & 1) for (i =3D 0; i <=3D 8; i--, res >>=3D 1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ d->W(i) =3D (res & 1) ? ~0 : 0; else for (i =3D 0; i <=3D 16; i--, res >>=3D 1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ d->B(i) =3D (res & 1) ? ~0 : 0; } else { d->Q(1) =3D 0; d->Q(0) =3D res; } } Kind regards, =46rank =2D-=20 Dr.-Ing. Frank Mehnert Senior Manager Software Development Desktop Virtualization, VirtualBox ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt, Germany Hauptverwaltung: Riesstr. 25, D-80992 M=FCnchen Registergericht: Amtsgericht M=FCnchen, HRA 95603 Komplement=E4rin: ORACLE Deutschland Verwaltung B.V. Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697 Gesch=E4ftsf=FChrer: J=FCrgen Kunz, Marcel van de Molen, Alexander van der = Ven --nextPart2795203.4xM0uoHW8a Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk6EKHUACgkQ6z8pigLf3EdhZwCeM1eMJZZ3WOVaPyNLenc5+CEt C3QAn3wth7EOw/trmcrEtQXdIbjLdMdq =S8Ei -----END PGP SIGNATURE----- --nextPart2795203.4xM0uoHW8a--