[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values |
Date: |
Tue, 17 Nov 2015 19:24:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Paolo Bonzini <address@hidden> writes:
> On 17/11/2015 18:39, Markus Armbruster wrote:
>> The kernel switched from -fwrapv to -fno-strict-overflow in '09, because
>> -fwrapv was buggy in gcc 4.1 (already old then, completely irrelevant
>> now), and because it "seems to be much less disturbing to gcc too: the
>> difference in the generated code by -fno-strict-overflow are smaller
>> (compared to using neither flag) than when using -fwrapv", which may or
>> may not be still the case with compilers that matter today.
>>
>> Could you briefly explain why you picked -fwrapv and not
>> -fno-strict-overflow?
>
> Because -fno-strict-overflow doesn't silence ubsan, only -fwrapv does
> (it doesn't silence it for negative left shifts, but I've asked on
> gcc-patches whether they'd like to have that fixed as well).
Add something like that to the commit message, and you have my
Reviewed-by: Markus Armbruster <address@hidden>
> In the meanwhile I got some good news from the GCC folks:
>
>>> I think we should remove the ", but this is subject to change" in
>>> implement-c.texi (while replacing it with noting that ubsan will still
>>> diagnose such cases, and they will also be diagnosed where constant
>>> expressions are required).
Makes only sense.
- Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values, (continued)
- Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values, Markus Armbruster, 2015/11/17
- Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values, Paolo Bonzini, 2015/11/17
- Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values, Peter Maydell, 2015/11/17
- Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values, Paolo Bonzini, 2015/11/17
- Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values, Peter Maydell, 2015/11/17
- Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values, Paolo Bonzini, 2015/11/17
- Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values, Peter Maydell, 2015/11/17
- Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values, Markus Armbruster, 2015/11/17
- Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values, Paolo Bonzini, 2015/11/17
- Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values,
Markus Armbruster <=