Hi Patrick,
Glad to know that efforts have been made to add inlining subword atomic supports into gcc.
The patch looks great so far, yet as Andreas Schwab has pointed out (at
riscv-collab/riscv-gcc#337), looks like it only contains atomic fetch stuff. Just wondering
do you have further plans to implement support for atomic store / exchange as well? Also,
as a reminder, note that after adding store / exchange supports, some related macros like
ATOMIC_BOOL_LOCK_FREE and ATOMIC_CHAR_LOCK_FREE's values (defined in <atomic>) may
need to be set to true. Currently in RISC-V gcc, they are all defined as false. This may
also need to be done for std::atomic<bool>::is_always_lock_free and
std::atomic_is_lock_free(bool_var).
See:https://en.cppreference.com/w/cpp/atomic/atomic_is_lock_free and
https://github.com/riscv-collab/riscv-gcc/issues/337#issuecomment-1086664815
What's your opinion on this?
Best regards, RZ Pan (XieJiSS)