在 2024/3/8 下午2:22, Xi Ruoyao 写道:
On Thu, 2024-03-07 at 21:07 +0800, chenglulu wrote:
在 2024/3/7 下午8:52, Xi Ruoyao 写道:
It should be better to extend the expected value before the ll/sc loop
(like what LLVM does), instead of repeating the extending in each
iteration.  Something like:
I wanted to do this at first, but it didn't work out.

But then I thought about it, and there are two benefits to putting it in
the middle of ll/sc:

1. If there is an operation that uses the $r4 register after this atomic
operation, another

register is required to store $r4.

2. ll.w requires long cycles, so putting an addi.w command after ll.w
won't make a difference.

So based on the above, I didn't try again, but directly made a
modification like a patch.
Ah, the explanation makes sense to me.  Ok with the original patch then.
Ok.Thank you so much!:-)

Reply via email to