https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86005
--- Comment #5 from Jim Wilson <wilson at tuliptree dot org> --- On Thu, 2018-05-31 at 05:40 +0000, asb at lowrisc dot org wrote: > Actually I think this bug is wider in scope than I first thought. GCC > will also > intermix __atomic libcalls and inline instruction sequences with > -march=rv32ia > when values less than XLEN in size are accessed. FYI I have a prototype patch to fix this. I copied the subword atomic support from the ppc port, and hacked it to work. I haven't done the fences yet, so it probably won't work if you have more than one thread, but it works well enough to handle the gcc/g++ testsuites. It also needs some cleanup to remove more ppc specific stuff. I don't know when I will have time to finish it though.