On 05/22/2015 09:55 AM, David Edelsohn wrote:
On Fri, May 22, 2015 at 9:40 AM, Jason Merrill <ja...@redhat.com> wrote:
On 05/22/2015 07:23 AM, Ramana Radhakrishnan wrote:
+ /* Load the guard value only through an atomic acquire load. */
+ guard = build_atomic_load (guard, MEMMODEL_ACQUIRE);
+
/* Check to see if the GUARD is zero. */
guard = get_guard_bits (guard);
I wonder if these calls should be reversed, to express that we're only
trying to atomically load a byte (on non-ARM targets)?
That expresses the semantics more directly, but will that lead to less
efficient code on some RISC architectures?
I'm not sure. I would expect that the target would use a larger load
and mask it if that is better for performance, but I don't know.
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.
Jason