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>
I don't think we should pollute the definitions here with a series of
conditionals. Instead I would suggest defining the likes of KMP_TEST_THEN_INC64(p) and the other 64 bit atomics as
Where the likes of KMP_TEST_THEN_INC64_IMPL is defined before these macros under a single #if like:
With the necessary MIPS specific code included in that #elif branch. That conditional define will need a comment explaining that MIPS32 lacks 64bit atomics and so must use libatomic's implementation of those functions.