On 05/22/2015 11:23 AM, Ramana Radhakrishnan wrote:
On 22/05/15 15:28, Jason Merrill wrote:
I do notice that get_guard_bits after build_atomic_load just won't work
on non-ARM targets, as it ends up trying to take the address of a value.
So on powerpc where targetm.guard_mask_bit is false - this is what I see.
&(long long int) __atomic_load_8 (&_ZGVZ1fvE1p, 2)
This is the bit that doesn't make sense to me. __atomic_load_8 returns
a value; what does it mean to take its address? If we're going to load
more than just the first byte, we should mask off the rest rather than
trying to mess with its address.
It also seems unnecessary to load 8 bytes on any target; we could add a
function to optabs.c that returns the smallest mode for which there's
atomic load support?
Jason