On Fri, Mar 03, 2023 at 12:01:22AM +0800, Xi Ruoyao via Gcc-patches wrote: > But then it causes "-mabi=lp64s -march=loongarch64" to generate code like: > > movgr2fr.d $fa0, $a0 > frecip.d $fa0, $fa0 > movfr2gr.d $a0, $fa0 > > The problem here is "loongarch64" is never strictly defined. So we > consider "loongarch64" a "64-bit LoongArch CPU with the simplest FPU > needed by the ABI", and if -march=loongarch64 but -mfpu is not > explicitly used, we set -mfpu such a simplest one.
Thanks for the fix on TARGET_*_FLOAT_ABI usage! Certainly more testing needs to be done on the soft-float side. However, "loongarch64" is defined to include the "fpu64" ISA module[1] (i.e. enable "-mfpu=64" when -mfpu is not explicitly used). So I believe the above behavior you observed is expected. [1] Table 5. Target CPU Models, https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html