The entire patch bootstrapped and regtested on loongarch64-linux-gnu with -march=la664, and I've also tried several simple 16-byte atomic operation tests locally.
OK for trunk? Or maybe the clean up is OK but the 16-byte atomic implementation still needs to be confirmed by the hardware team? Xi Ruoyao (17): LoongArch: (NFC) Remove atomic_optab and use amop instead LoongArch: (NFC) Remove amo and use size instead LoongArch: Don't use "+" for atomic_{load,store} "m" constraint LoongArch: Allow using bstrins for masking the address in atomic_test_and_set LoongArch: Don't emit overly-restrictive barrier for LL-SC loops LoongArch: Remove unneeded "b 3f" instruction after LL-SC loops LoongArch: Remove unneeded "andi offset,addr,3" instruction in atomic_test_and_set LoongArch: Implement subword atomic_fetch_{and,or,xor} with am*.w instructions LoongArch: Don't expand atomic_fetch_sub_{hi,qi} to LL-SC loop if -mlam-bh LoongArch: Implement atomic_fetch_nand<GPR:mode> LoongArch: Implement 16-byte atomic load with LSX LoongArch: Implement 16-byte atomic store with LSX LoongArch: Add -m[no-]scq option LoongArch: Implement 16-byte atomic store with sc.q LoongArch: Implement 16-byte CAS with sc.q LoongArch: Implement 16-byte atomic exchange with sc.q LoongArch: Implement 16-byte atomic add, sub, and, or, xor, and nand with sc.q gcc/config/loongarch/genopts/isa-evolution.in | 1 + gcc/config/loongarch/loongarch-def.cc | 4 +- gcc/config/loongarch/loongarch-evolution.cc | 4 + gcc/config/loongarch/loongarch-evolution.h | 8 +- gcc/config/loongarch/loongarch-str.h | 1 + gcc/config/loongarch/loongarch.cc | 30 +- gcc/config/loongarch/loongarch.opt | 4 + gcc/config/loongarch/sync.md | 641 ++++++++++++------ gcc/doc/invoke.texi | 11 +- 9 files changed, 494 insertions(+), 210 deletions(-) -- 2.48.1