[PATCH] fix for aarch64 sim tbnz bug

Jim Wilson jim.wilson@linaro.org
Fri Dec 2 15:59:00 GMT 2016

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.


More information about the Gdb-patches mailing list