https://bugs.kde.org/show_bug.cgi?id=415136

--- Comment #5 from ahashmi <assad.has...@linaro.org> ---
Thanks for reviewing in detail.

Good point about splitting up the large patch. I've
uploaded the implementation and tests as 2 separate patches:
arm64_v81_cas_impl.patch
arm64_v81_cas_test.patch

> I am going to need some context to make sense of this...

The loop in this context is not looping for the same reason guest code
using a CAS instruction would loop. In this case the cbne w8, loop
instruction is checking to see if the previous store exclusive worked.
The spec says that store exclusives return 0 in the w register if the
store updated memory, 1 if it failed to update. This way we always make
sure that memory has been updated before returning from the CAS.
Previously it would have returned even if the store failed.

> Also, what is the reason for changing the hardwired register numbers?

Adding the store check loop means we need to compare the store's status
value in a w register and since w8 is the scratch register we use that,
leaving w1/x1 untouched after the load.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to