https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109000
Bug ID: 109000 Summary: LoongArch: "unmatched" -mabi and -mfpu setting can break ABI silently Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: xry111 at gcc dot gnu.org Target Milestone: --- $ cat t.c double t(double x) { return 1.0 / x; } $ ~/gcc-trunk/bin/gcc t.c -O2 -c -mabi=lp64s $ readelf -a t.o | grep FLOAT Flags: 0x41, SOFT-FLOAT, OBJ-v1 $ objdump -d t.o t.o: file format elf64-loongarch Disassembly of section .text: 0000000000000000 <t>: 0: 01145800 frecip.d $fa0, $fa0 4: 4c000020 jirl $zero, $ra, 0 So we now have a SOFT-FLOAT object using FPR for arguments and return values :(.