[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 2/9] QEMU does not care about left shifts of sign
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PULL 2/9] QEMU does not care about left shifts of signed negative values |
Date: |
Wed, 25 Nov 2015 20:30:11 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 25/11/2015 20:18, Peter Maydell wrote:
> And LLVM is its own project and its developers don't always exactly
> follow gcc behaviour.
True. The patch docuuments that if LLVM will not respect 2s complement
for signed shifts when passed the -fwrapv option, it will not be
supported for compilation of QEMU. But let;s cross that bridge when we
reach it. So far, -Wshift-negative-value seems to be a misguided
attempt to copy GCC's warning without understanding it.
> Your latest patch at https://gcc.gnu.org/ml/gcc-patches/2015-11/msg03055.html
> doesn't seem to touch the documentation of -fwrapv at all, so I
> don't think it is sufficient to allow users of the compiler
> to say "-fwrapv means signed behaviour for shifts".
GCC *always* does signed behavior for shifts, even without -fwrapv.
I'll commit tomorrow the patch that promises that for the future.
GCC does not need -fwrapv at all.
Paolo
- [Qemu-devel] [PULL 3/9] call bdrv_drain_all() even if the vm is stopped, (continued)
- [Qemu-devel] [PULL 3/9] call bdrv_drain_all() even if the vm is stopped, Paolo Bonzini, 2015/11/25
- [Qemu-devel] [PULL 4/9] Revert "exec: silence hugetlbfs warning under qtest", Paolo Bonzini, 2015/11/25
- [Qemu-devel] [PULL 6/9] target-sparc: fix 32-bit truncation in fpackfix, Paolo Bonzini, 2015/11/25
- [Qemu-devel] [PULL 5/9] exec: remove warning about mempath and hugetlbfs, Paolo Bonzini, 2015/11/25
- [Qemu-devel] [PULL 8/9] target-i386: kvm: Use env->mcg_cap when setting up MCE, Paolo Bonzini, 2015/11/25
- [Qemu-devel] [PULL 1/9] MAINTAINERS: Update TCG CPU cores section, Paolo Bonzini, 2015/11/25
- [Qemu-devel] [PULL 2/9] QEMU does not care about left shifts of signed negative values, Paolo Bonzini, 2015/11/25
- Re: [Qemu-devel] [PULL 2/9] QEMU does not care about left shifts of signed negative values, Peter Maydell, 2015/11/25
- Re: [Qemu-devel] [PULL 2/9] QEMU does not care about left shifts of signed negative values, Paolo Bonzini, 2015/11/25
- Re: [Qemu-devel] [PULL 2/9] QEMU does not care about left shifts of signed negative values, Peter Maydell, 2015/11/25
- Re: [Qemu-devel] [PULL 2/9] QEMU does not care about left shifts of signed negative values,
Paolo Bonzini <=
- Re: [Qemu-devel] [PULL 2/9] QEMU does not care about left shifts of signed negative values, Peter Maydell, 2015/11/25
- Re: [Qemu-devel] [PULL 2/9] QEMU does not care about left shifts of signed negative values, Paolo Bonzini, 2015/11/25
- Re: [Qemu-devel] [PULL 2/9] QEMU does not care about left shifts of signed negative values, Peter Maydell, 2015/11/25
[Qemu-devel] [PULL 7/9] target-i386: kvm: Abort if MCE bank count is not supported by host, Paolo Bonzini, 2015/11/25
[Qemu-devel] [PULL 9/9] target-i386: kvm: Print warning when clearing mcg_cap bits, Paolo Bonzini, 2015/11/25
Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25), Peter Maydell, 2015/11/26