
Miro Jurisic wrote:
In article <004e01c53ac9$35901640$6601a8c0@pdimov>, "Peter Dimov" <pdimov@mmltd.net> wrote:
or something like that. Post-release. The current code is good (and risky) enough. :-)
My understanding from having spoken to several Apple engineers whom I consider knowledgeable on this topic is that it's a very bad idea to write assembly code to perform atomic operations on the PPC. There is a variety of CPU-specific idiosyncracies that make it very difficult to write such code correctly. As you might imagine, writing such code not quite correctly leads bugs that are very hard to track down.
Yes... On the one hand, when the OS developers say that their API should be used, one should listen. On the other hand, none of the technical notes state a concrete problem with lwarx/stwcx. I am inclined to think that the problems with hand-written lwarx/stwcx. code are not caused by CPU-specific idiosyncracies, but by memory visibility issues. Which we have taken care of. (Memory visibility could be described as CPU-specific, of course.) Google knows about one problem with stwcx. on PPC405, known as "erratum 77". But to the best of my knowledge no Mac has ever used a 405.