All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <rth@twiddle.net>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Patch Tracking <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 2/2] target-arm: Avoid "1 << 31" undefined behaviour
Date: Sat, 24 Aug 2013 11:38:02 +0100	[thread overview]
Message-ID: <CAFEAcA92P39UXb8+v_anunMxsYnWg09svZiLzhF2skqxRGh5nQ@mail.gmail.com> (raw)
In-Reply-To: <5217A5BC.80409@twiddle.net>

On 23 August 2013 19:11, Richard Henderson <rth@twiddle.net> wrote:
> On 08/23/2013 09:12 AM, Peter Maydell wrote:
>>  #define CPSR_V (1 << 28)
>>  #define CPSR_C (1 << 29)
>>  #define CPSR_Z (1 << 30)
>> -#define CPSR_N (1 << 31)
>> +#define CPSR_N (1U << 31)
>>  #define CPSR_NZCV (CPSR_N | CPSR_Z | CPSR_C | CPSR_V)
>
> You'd be better off making all of the CPSR bits unsigned, I think.

Agreed; let's be consistent.

-- PMM

      reply	other threads:[~2013-08-24 10:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23 16:12 [Qemu-devel] [PATCH 0/2] target-arm: Avoid clang sanitizer warnings Peter Maydell
2013-08-23 16:12 ` [Qemu-devel] [PATCH 1/2] target-arm: Use sextract32() in branch decode Peter Maydell
2013-08-23 18:09   ` Richard Henderson
2013-08-24 10:21     ` Peter Maydell
2013-08-23 16:12 ` [Qemu-devel] [PATCH 2/2] target-arm: Avoid "1 << 31" undefined behaviour Peter Maydell
2013-08-23 18:11   ` Richard Henderson
2013-08-24 10:38     ` Peter Maydell [this message]

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=CAFEAcA92P39UXb8+v_anunMxsYnWg09svZiLzhF2skqxRGh5nQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.