On 18/12/2014 16:05, Alexander Graf wrote: > Yeah, the semantics should be tied to what TM would give you. We can > always be more safe than TM in our fallback implementation, but I > wouldn't want to see semantic optimizations tied to the MMIO > implementation put in. > > This is mostly theory though, try to write the code and see where things > fall apart, then we'll be in a much better position to rationalize on > where to do things differently.
Yeah, this is why I think LL/SC ops for TCG are more interesting and important than CMPXCHG. Also because x86 doesn't have just CMPXCHG, it also has XADD which you'd have to implement anyway as a LL/SC or CMPXCHG loop, so CMPXCHG doesn't get you all the way. Paolo