From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LbBjw-0003IX-Bf for qemu-devel@nongnu.org; Sun, 22 Feb 2009 05:39:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LbBjt-0003I5-KA for qemu-devel@nongnu.org; Sun, 22 Feb 2009 05:39:14 -0500 Received: from [199.232.76.173] (port=57661 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LbBjt-0003I0-Bo for qemu-devel@nongnu.org; Sun, 22 Feb 2009 05:39:13 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:44548) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LbBjs-0007HU-FF for qemu-devel@nongnu.org; Sun, 22 Feb 2009 05:39:13 -0500 Message-ID: <49A12B4A.9040901@web.de> Date: Sun, 22 Feb 2009 11:39:06 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <20090221190054.12485.30486.stgit@mchn012c.ww002.siemens.net> <761ea48b0902211143x3f791ca8k5e6d0709076ce009@mail.gmail.com> <49A05F5D.6070903@web.de> <761ea48b0902211508w75a0f6f2h20773f885db228f5@mail.gmail.com> In-Reply-To: <761ea48b0902211508w75a0f6f2h20773f885db228f5@mail.gmail.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD414B0EB4E76886EEB9EDD58" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 0/7] clean build - eliminate warnings Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paul Brook , Aurelien Jarno This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD414B0EB4E76886EEB9EDD58 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Laurent Desnogues wrote: > On Sat, Feb 21, 2009 at 9:09 PM, Jan Kiszka wrote: >> Laurent Desnogues wrote: >>> On Sat, Feb 21, 2009 at 8:00 PM, Jan Kiszka wrote= : >>>> When working on larger or intrusive changes like the monitor rework,= the >>>> number of warnings a normal build generates (here: x86-64 host, gcc = 4.3) >>>> is still too high. And sometimes these warnings are not just of cosm= etic >>>> nature, see (reposted) patch 3. >>>> >>>> This series reduces the number of warnings significantly, still not = to >>>> zero (someone would have to look into the NetWinder stuff), but almo= st: >>>> >>>> Warning summary for 2009-02-21 (changes since 2009-02-21-base) >>>> generic 0 (-1) >>>> softmmu 0 (-39) >>>> x86 0 (0) >>>> arm 0 (-10) >>> This means that after applying your patch there should be no more >>> warning for the ARM target? >> At least for softmmu, at least with my compiler (depending on the >> precise version / distro patches, you may have different warnings >> enabled by default): yes. >=20 > I built softmmu and my Makefile has no other warning than the > default. >=20 >>> On my machine (x86_64, gcc 4.1.2), I still get these: >>> >>> CC arm-softmmu/neon_helper.o >>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c: In >>> function =91helper_neon_rshl_s8=92: >>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:469: >>> warning: =91vdest.v1=92 is used uninitialized in this function >>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:469: >>> warning: =91vdest.v2=92 is used uninitialized in this function >>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:469: >>> warning: =91vdest.v3=92 is used uninitialized in this function >>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:469: >>> warning: =91vdest.v4=92 is used uninitialized in this function >>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c: In >>> function =91helper_neon_rshl_s16=92: >>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:470: >>> warning: =91vdest.v1=92 is used uninitialized in this function >>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:470: >>> warning: =91vdest.v2=92 is used uninitialized in this function >>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c: In >>> function =91helper_neon_rshl_s32=92: >>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:471: >>> warning: =91vdest.v1=92 is used uninitialized in this function >> Has this been identified as a real issue or just compiler blindness (m= y >> series contains one "fix" for such blindness, see cris patch)? I'm >> currently a bit lost in those macros... >=20 > Yes, it's a real bug: dest has not been given a value. You can > look at preprocessed code :-) Yeah, preprocessed and Lindent'ed, this looks really buggy. > BTW, can gcc really say a value > is used uninitialized? I have seen it pretending "may be used > uninitialized" though it is, but it was always right when it says > "is used uninitialized". Obviously, detecting uninitialized variables with gcc still leaves room for improvement. Version 4.3 actually seem to have regressed in this case= =2E >=20 >>> Note a patch has been proposed in the past (by Aur=E9lien IIRC). >> Do you have a reference at hand? >=20 > Try this: >=20 > http://article.gmane.org/gmane.comp.emulators.qemu/31206 OK, that makes sense, partially. My feeling is that there are some more typos/thinkos in this code. First, the macro for 8/16/32 bit checks for a shift width of -8/-16/-32, but the 64-bit version uses -63?! And then we have this (for signed rshl): dest =3D src >> (width - 1); dest++; dest >>=3D 1; Looks like nothing else than dest =3D 0, no? Paul? Jan --------------enigD414B0EB4E76886EEB9EDD58 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkmhK04ACgkQniDOoMHTA+kVSgCeOJ9C2nVti9NlcevBmB51UqVj n78An1K29Riz/YYHWhlmchJEdqnZ8Ete =4UOH -----END PGP SIGNATURE----- --------------enigD414B0EB4E76886EEB9EDD58--