The following GCC intrinsics are not available on MIPS32:
__sync_fetch_and_add_8 __sync_fetch_and_and_8 __sync_fetch_and_or_8 __sync_val_compare_and_swap_8
This patch is replacing these with appropriate libatomic implementation.
Patch by Miodrag Dinic <miodrag.dinic@mips.com>