K 10 svn:author V 2 ed K 8 svn:date V 27 2013-06-08T13:19:11.335426Z K 7 svn:log V 802 Add proper __sync_*() intrinsics for MIPS. To make work on MIPS (and ARM) using GCC, we need to provide implementations of the __sync_*() functions. I already added these functions for 4 and 8 byte types to libcompiler-rt some time ago, based on top of . Unfortunately, only provides a subset of the features needed to implement . This means that in some cases we had to do compare-and-exchange calls in loops, where a simple ll/sc would suffice. Also implement these functions for 1 and 2 byte types. MIPS only provides ll/sc instructions for 4 and 8 byte types, but this is of course no limitation. We can simply load 4 bytes and use some bitmask tricks to modify only the bytes affected. Discussed on: mips, arch Tested with: QEMU END