qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel@nongnu.org
Cc: Paul Brook <paul@codesourcery.com>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] Re: [PATCH 0/7] clean build - eliminate warnings
Date: Sun, 22 Feb 2009 12:09:59 +0100	[thread overview]
Message-ID: <49A13287.9070008@web.de> (raw)
In-Reply-To: <49A12B4A.9040901@web.de>

Jan Kiszka wrote:
> Laurent Desnogues wrote:
>> On Sat, Feb 21, 2009 at 9:09 PM, Jan Kiszka <jan.kiszka@web.de> wrote:
>>> Laurent Desnogues wrote:
>>>> On Sat, Feb 21, 2009 at 8:00 PM, Jan Kiszka <jan.kiszka@web.de> 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 cosmetic
>>>>> 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 almost:
>>>>>
>>>>> 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.
>> I built softmmu and my Makefile has no other warning than the
>> default.
>>
>>>> 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 ‘helper_neon_rshl_s8’:
>>>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:469:
>>>> warning: ‘vdest.v1’ is used uninitialized in this function
>>>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:469:
>>>> warning: ‘vdest.v2’ is used uninitialized in this function
>>>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:469:
>>>> warning: ‘vdest.v3’ is used uninitialized in this function
>>>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:469:
>>>> warning: ‘vdest.v4’ is used uninitialized in this function
>>>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c: In
>>>> function ‘helper_neon_rshl_s16’:
>>>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:470:
>>>> warning: ‘vdest.v1’ is used uninitialized in this function
>>>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:470:
>>>> warning: ‘vdest.v2’ is used uninitialized in this function
>>>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c: In
>>>> function ‘helper_neon_rshl_s32’:
>>>> /home/ldesnogu/work/Emu/qemu/svn-ref/target-arm/neon_helper.c:471:
>>>> warning: ‘vdest.v1’ is used uninitialized in this function
>>> Has this been identified as a real issue or just compiler blindness (my
>>> series contains one "fix" for such blindness, see cris patch)? I'm
>>> currently a bit lost in those macros...
>> 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.
> 
>>>> Note a patch has been proposed in the past (by Aurélien IIRC).
>>> Do you have a reference at hand?
>> Try this:
>>
>> 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 = src >> (width - 1);
>  dest++;
>  dest >>= 1;
> 
> Looks like nothing else than dest = 0, no? Paul?

One more:
    [NEON_FN for rshl_s8/16/32]
    ...
    } else if (tmp == -sizeof(src1) * 8) { \
        dest = src1 >> (tmp - 1); \
ie.
    if (tmp == -8/-16/-32) {
        dest = src1 >> (-9/-17/-33);

Jan

  reply	other threads:[~2009-02-22 11:10 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-21 19:00 [Qemu-devel] [PATCH 0/7] clean build - eliminate warnings Jan Kiszka
2009-02-21 19:00 ` [Qemu-devel] [PATCH 3/7] arm: Fix gic_irq_state.level bitfield type Jan Kiszka
2009-03-07 21:48   ` Aurelien Jarno
2009-02-21 19:00 ` [Qemu-devel] [PATCH 2/7] clean build: Fix irq_info and pic_info related warnings Jan Kiszka
2009-02-21 19:00 ` [Qemu-devel] [PATCH 5/7] clean build: Fix remaining cris warnings Jan Kiszka
2009-02-21 23:03   ` Stuart Brady
2009-02-21 23:12     ` Stuart Brady
2009-02-21 23:13     ` Laurent Desnogues
2009-02-22 10:36       ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2009-02-22 14:14         ` Edgar E. Iglesias
2009-02-21 23:14     ` [Qemu-devel] [PATCH " Paul Brook
2009-02-21 19:00 ` [Qemu-devel] [PATCH 1/7] clean build: Add bt_host_hci prototype Jan Kiszka
2009-03-08 14:56   ` [Qemu-devel] " Jan Kiszka
2009-03-08 18:44     ` Aurelien Jarno
2009-03-08 19:56       ` [Qemu-devel] [PATCH] clean build: Add bt-host.h Jan Kiszka
2009-03-10 21:43         ` Aurelien Jarno
2009-03-10 23:03         ` andrzej zaborowski
2009-03-11  9:02           ` [Qemu-devel] " Jan Kiszka
2009-03-20 14:51             ` andrzej zaborowski
2009-02-21 19:00 ` [Qemu-devel] [PATCH 4/7] clean build: Fix arm build warnings Jan Kiszka
2009-03-07 21:48   ` Aurelien Jarno
2009-02-21 19:00 ` [Qemu-devel] [PATCH 7/7] clean build: Fix remaining sh4 warnings Jan Kiszka
2009-02-21 19:00 ` [Qemu-devel] [PATCH 6/7] clean build: Fix remaining m68k warnings Jan Kiszka
2009-03-07 21:48   ` Aurelien Jarno
2009-02-21 19:43 ` [Qemu-devel] [PATCH 0/7] clean build - eliminate warnings Laurent Desnogues
2009-02-21 20:09   ` [Qemu-devel] " Jan Kiszka
2009-02-21 23:08     ` Laurent Desnogues
2009-02-22 10:39       ` Jan Kiszka
2009-02-22 11:09         ` Jan Kiszka [this message]
2009-02-22  0:59     ` Edgar E. Iglesias
2009-02-22 10:20       ` Jan Kiszka

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=49A13287.9070008@web.de \
    --to=jan.kiszka@web.de \
    --cc=aurelien@aurel32.net \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /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).