Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-04-06 17:39:37


Miro Jurisic wrote:
> In article <004e01c53ac9$35901640$6601a8c0_at_pdimov>,
> "Peter Dimov" <pdimov_at_[hidden]> 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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk