From: Jim Wilson <jim.wilson@linaro.org>
To: Nick Clifton <nickc@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] fix for aarch64 sim tbnz bug
Date: Fri, 02 Dec 2016 15:59:00 -0000 [thread overview]
Message-ID: <CABXYE2XDS=6yWtxw0v7Sp2OA0N6CUFfYWApFJg_VRKM6NzFWag@mail.gmail.com> (raw)
In-Reply-To: <81f852ec-2ef8-9551-dd9e-de93909adef6@redhat.com>
On Fri, Dec 2, 2016 at 4:03 AM, Nick Clifton <nickc@redhat.com> wrote:
> Just one question:
> + if (aarch64_get_reg_u64 (cpu, rt, NO_SP) & (((uint64_t) 1) << pos))
> Would:
> + if (aarch64_get_reg_u64 (cpu, rt, NO_SP) & (1UL << pos)
> work as well, or would this break on 32-bit hosts ?
I don't think that 1UL works, as long could be 32-bits. It would have
to be 1ULL. But that assumes that long long is 64-bits.
aarch64_get_reg_u64 is defined to return uint64_t, so casting to that
seemed the best choice to me, to keep types consistent.
Jim
prev parent reply other threads:[~2016-12-02 15:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-02 4:49 Jim Wilson
2016-12-02 9:32 ` Mike Frysinger
2016-12-05 3:45 ` Jim Wilson
2016-12-12 18:38 ` Jim Wilson
2016-12-12 18:42 ` Mike Frysinger
2016-12-13 0:33 ` Jim Wilson
2016-12-13 6:38 ` Mike Frysinger
2016-12-13 10:45 ` Nick Clifton
2016-12-02 12:03 ` Nick Clifton
2016-12-02 15:59 ` Jim Wilson [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='CABXYE2XDS=6yWtxw0v7Sp2OA0N6CUFfYWApFJg_VRKM6NzFWag@mail.gmail.com' \
--to=jim.wilson@linaro.org \
--cc=gdb-patches@sourceware.org \
--cc=nickc@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