Hi Patrick,
We are more than delighted to hear that you'd like to implement inlining subword atomic load/store and exchange as well!
I searched for these macros in the gcc codebase, and it seems like the internal logic that defines ATOMIC_* builtin macros can be found at gcc/c-family/c-cppbuiltin.cc#L665-L796 (inside static void cpp_atomic_builtins), while is_always_lock_free is at libstdc++-v3/include/std/atomic#L99. I'm not 100% sure, though, due to my limited understanding of the codebase. Hope this information helps :-)
Yours sincerely, Pan RZ (XieJiSS) @ PLCT Lab