From: Aaron Lindsay OS <aaron@os.amperecomputing.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: "qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
Peter Maydell <peter.maydell@linaro.org>,
Alistair Francis <alistair.francis@xilinx.com>,
Wei Huang <wei@redhat.com>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Michael Spradling <mspradli@codeaurora.org>,
Digant Desai <digantd@codeaurora.org>
Subject: Re: [Qemu-devel] [PATCH v11 1/2] target/arm: Send interrupts on PMU counter overflow
Date: Thu, 24 Jan 2019 15:53:48 +0000 [thread overview]
Message-ID: <20190124155350.GF5213@quinoa.localdomain> (raw)
In-Reply-To: <7794239c-7850-1bb6-cbcb-b648533d9036@linaro.org>
On Jan 23 15:37, Richard Henderson wrote:
> On 1/23/19 1:32 PM, Aaron Lindsay OS wrote:
> > + uint64_t overflow_mask = env->cp15.c9_pmcr & PMCRLC ? \
> > + INT64_MIN : INT32_MIN;
>
> With type promotion, this is the same as writing
>
> ? 0x8000000000000000ull : 0xffffffff80000000ull
>
> which is probably not what you were intending.
>
> Perhaps just ? 1ull << 63 : 1ull << 31 is better?
You are correct. I think we changed this to INT32_MIN in an earlier
respin in an attempt at simplification, but I didn't catch the type
promotion issue.
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Thanks, I'll send out a v12 momentarily.
-Aaron
next prev parent reply other threads:[~2019-01-24 15:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 21:32 [Qemu-devel] [PATCH v11 0/2] More fully implement ARM PMUv3 Aaron Lindsay OS
2019-01-23 21:32 ` [Qemu-devel] [PATCH v11 1/2] target/arm: Send interrupts on PMU counter overflow Aaron Lindsay OS
2019-01-23 23:37 ` Richard Henderson
2019-01-24 15:53 ` Aaron Lindsay OS [this message]
2019-01-23 21:32 ` [Qemu-devel] [PATCH v11 2/2] target/arm: Add a timer to predict " Aaron Lindsay OS
2019-01-23 23:38 ` Richard Henderson
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=20190124155350.GF5213@quinoa.localdomain \
--to=aaron@os.amperecomputing.com \
--cc=alistair.francis@xilinx.com \
--cc=crosthwaite.peter@gmail.com \
--cc=digantd@codeaurora.org \
--cc=mspradli@codeaurora.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=wei@redhat.com \
/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).