From: Bernd Schmidt Date: Wed, 27 Nov 2019 13:07:44 +0000 (+0000) Subject: m68k.c (m68k_output_compare_fp): Restore differences between Coldfire and regular... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45a454883eef8acbdad75c0f376aaf22ec7416ff;p=gcc.git m68k.c (m68k_output_compare_fp): Restore differences between Coldfire and regular m68k. * config/m68k/m68k.c (m68k_output_compare_fp): Restore differences between Coldfire and regular m68k. * config/m68k/m68k.md (cmp1_cf_constraints): Disallow constants. From-SVN: r278767 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e15d2e598c8..9899c377305 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-11-27 Bernd Schmidt + + * config/m68k/m68k.c (m68k_output_compare_fp): Restore differences + between Coldfire and regular m68k. + * config/m68k/m68k.md (cmp1_cf_constraints): Disallow constants. + 2019-11-27 Richard Biener * target.def (TARGET_VECTORIZE_BUILTIN_CONVERSION): Remove. 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); diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 25e0b73741f..454f822e392 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -496,7 +496,7 @@ ;; needs to be reloaded. (define_mode_attr scc0_cf_constraints [(QI "=d") (HI "=d") (SI "=d,d,d")]) -(define_mode_attr cmp1_cf_constraints [(QI "dm") (HI "dm") (SI "mrKs,r,rm")]) +(define_mode_attr cmp1_cf_constraints [(QI "dm") (HI "dm") (SI "mr,r,rm")]) (define_mode_attr cmp2_cf_constraints [(QI "C0") (HI "C0") (SI "r,mrKs,C0")]) (define_mode_attr cmp2_cf_predicate [(QI "const0_operand") (HI "const0_operand") (SI "general_operand")])