6d57c75097
The built-in atomic operations are not implemented in our version of GCC 4.2 for the ARM and MIPS architectures. Instead of emitting locked instructions, they generate calls to functions that can be implemented in the C runtime. Only implement the atomic operations that are used by <stdatomic.h> for datatype sizes that are supported by atomic(9). This means that on these architectures, we can only use atomic operations on 32-bits and 64-bits variables, which is typically sufficient. This makes <stdatomic.h> work on all architectures except MIPS, since MIPS and SPARC64 still use libgcc. Converting these architectures to libcompiler_rt is on my todo list. |
||
---|---|---|
.. | ||
__sync_fetch_and_add_4.c | ||
__sync_fetch_and_add_8.c | ||
__sync_fetch_and_and_4.c | ||
__sync_fetch_and_and_8.c | ||
__sync_fetch_and_op_n.h | ||
__sync_fetch_and_or_4.c | ||
__sync_fetch_and_or_8.c | ||
__sync_fetch_and_sub_4.c | ||
__sync_fetch_and_sub_8.c | ||
__sync_fetch_and_xor_4.c | ||
__sync_fetch_and_xor_8.c | ||
__sync_lock_test_and_set_4.c | ||
__sync_lock_test_and_set_8.c | ||
__sync_val_compare_and_swap_4.c | ||
__sync_val_compare_and_swap_8.c | ||
__sync_val_compare_and_swap_n.h | ||
Makefile |