On 11/26/19 1:36 AM, Joseph Myers wrote: > I'm seeing a libgcc build failure for coldfire in my build-many-glibcs.py > bot (m68k-linux-gnu configured --with-arch=cf --disable-multilib). That's > building _mulsc3.o; I get assembler errors:
I overlooked a difference in the 68881 vs coldfire patterns when I combined them. They use different suffixes for register compares (I only spotted the different constraints). The following seems to fix the assembler failures. I cannot properly test Coldfire however due to lack of hardware. Bernd
* config/m68k/,68k.c (m68k_output_compare_fp): Use .d instead of .x for register compares on Coldfire. diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 8d010ebe6e9..4b30c401e80 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -4501,7 +4501,12 @@ m68k_output_compare_fp (rtx op0, rtx op1, rtx_code code) if (op1 == CONST0_RTX (GET_MODE (op0))) { if (FP_REG_P (op0)) - output_asm_insn ("ftst%.x %0", ops); + { + if (TARGET_COLDFIRE_FPU) + output_asm_insn ("ftst%.d %0", ops); + else + output_asm_insn ("ftst%.x %0", ops); + } else output_asm_insn (("ftst%." + prec + " %0").c_str (), ops); return code; @@ -4510,7 +4515,10 @@ m68k_output_compare_fp (rtx op0, rtx op1, rtx_code code) switch (which_alternative) { case 0: - output_asm_insn ("fcmp%.x %1,%0", ops); + if (TARGET_COLDFIRE_FPU) + output_asm_insn ("fcmp%.d %1,%0", ops); + else + output_asm_insn ("fcmp%.x %1,%0", ops); break; case 1: output_asm_insn (("fcmp%." + prec + " %f1,%0").c_str (), ops);