This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] fix for aarch64 sim tbnz bug
- From: Jim Wilson <jim dot wilson at linaro dot org>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 2 Dec 2016 07:59:01 -0800
- Subject: Re: [PATCH] fix for aarch64 sim tbnz bug
- Authentication-results: sourceware.org; auth=none
- References: <CABXYE2W++FWtcyNq4FAroJ2+VNJOHWs7-sdHMBm=6kOwSkD5Ug@mail.gmail.com> <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