This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sh atomics config


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
possible?


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
location.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]