[PATCH] [X86] Allow atomic operations using immediates to avoid using a register
Philip Reames
listmail at philipreames.com
Thu Aug 7 15:43:09 PDT 2014
>>! In D4796#14, @morisset wrote:
> Actually, on X86 the xchg instruction is a bit special in that it automatically behaves as if it had a LOCK prefix, even if it is not explicit (source: Intel manual, 2B 4-71)
> So I don't think it is a bug that it is not added.
You're right. I had forgotten this. Sorry for the noise.
> Do you think I should add a comment somewhere to that effect? And if so where?
A note in the test might be warranted. It's valid to either have the lock prefix or not in the places I pointed out before.
> Thanks again for your reviews!
Glad to help where I can. I really really really don't want to be debugging these type of issues later. :)
http://reviews.llvm.org/D4796
More information about the llvm-commits
mailing list