Peter Maydell writes:
> On 6 February 2015 at 17:37, Eric Blake wrote:
>> On 02/06/2015 07:34 AM, Peter Maydell wrote:
>> HACKING already implies we assume sane 2's complement behavior of shifts
>> (maybe it's worth another line for this particular case of shifting into
>> the signed bit of a si
On 6 February 2015 at 17:37, Eric Blake wrote:
> On 02/06/2015 07:34 AM, Peter Maydell wrote:
> HACKING already implies we assume sane 2's complement behavior of shifts
> (maybe it's worth another line for this particular case of shifting into
> the signed bit of a signed result, and figuring out
On 02/06/2015 07:34 AM, Peter Maydell wrote:
> This patchset fixes a collection of warnings emitted by the clang
> undefined behaviour sanitizer in the course of booting an AArch64
> Linux guest to a shell prompt. These are all various kinds of bad
> shift (shifting into the sign bit, left shifting
On 02/06/2015 08:43 AM, Peter Maydell wrote:
> On 6 February 2015 at 16:20, Richard Henderson wrote:
>> It should be enough to simply add the unsigned suffix to the integers as they
>> are, forcing the underlying type to be unsigned.
>
> I can't see anything in the C99 spec that justifies this
>
On 6 February 2015 at 16:20, Richard Henderson wrote:
> It should be enough to simply add the unsigned suffix to the integers as they
> are, forcing the underlying type to be unsigned.
I can't see anything in the C99 spec that justifies this
as a fix... In fact, 6.7.2.2 para 3 says
"The identifie
On 02/06/2015 06:34 AM, Peter Maydell wrote:
> I can't see any nice way of avoiding this. Possible nasty ways:
>
> (1) Drop the enum and just use old-fashioned
> #define EC_AA64_BKPT 0x3cU
> since then we can force them to be unsigned
> (2) Cast the constant to unsigned at point of use
> (3) Keep
On 02/06/2015 07:57 AM, Greg Bellows wrote:
> Similar to the #define approach, but possibly with the benefits of the enum.
> What if you declare each enum separately as const unsigned int?
This is not c++. That won't do what you want.
r~
On Fri, Feb 6, 2015 at 8:34 AM, Peter Maydell
wrote:
> This patchset fixes a collection of warnings emitted by the clang
> undefined behaviour sanitizer in the course of booting an AArch64
> Linux guest to a shell prompt. These are all various kinds of bad
> shift (shifting into the sign bit, lef
This patchset fixes a collection of warnings emitted by the clang
undefined behaviour sanitizer in the course of booting an AArch64
Linux guest to a shell prompt. These are all various kinds of bad
shift (shifting into the sign bit, left shifting negative values,
shifting by more than the size of t