In particular, because loads and stores of the same variable cannot be reordered out of program order. Once your algorithm involves other variables, you would (likely) need to be a little careful about loading/storing with acquire/release semantics to prevent reordering other accesses relative to this protocol.
> Remember to use compiler memory barrier
I would highly recommend using the language atomic types (and barriers if truly needed) instead of gcc inline assembly syntax.