sh atomics config

Tue Sep 12 16:35:00 GMT 2006

Benjamin Kosnik wrote:

> I'd like to fix this up. In particular, I'd like to use some kind of
>host_cpu based switch, sh4-* for instance. Seems too easy: is this
The host CPU is irrelevant.  The preferred implementation is dependent 
on the
target CPU and operating system.
Moreover, this has to work with multilibs.

I suppose the issue with duplicating the generic code could be solved by
#including it instead.
However, that wouldn't solve the problem of having operating-system specific
bits in a library that is by and large operating-system independent.

>Also, can one of you two cc'd confirm that this is not applicable for
>sh5 or sh64?
The only atomic operation that the sh5 provides is the swap.q 
instruction, which
atomically reads an 8-byte aligned value and writes another value into 
the same

More information about the Libstdc++ mailing list