diff options
author | Bernd Schmidt <bernds_cb1@t-online.de> | 2019-11-27 13:07:44 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2019-11-27 13:07:44 +0000 |
commit | 45a454883eef8acbdad75c0f376aaf22ec7416ff (patch) | |
tree | e610654a4b299c4860a0036993618cc6d4007c4c | |
parent | 477daf831aea18923733772d686eb1ed448d96e7 (diff) | |
download | gcc-45a454883eef8acbdad75c0f376aaf22ec7416ff.zip gcc-45a454883eef8acbdad75c0f376aaf22ec7416ff.tar.gz gcc-45a454883eef8acbdad75c0f376aaf22ec7416ff.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.c | 12 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.md | 2 |
3 files changed, 17 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e15d2e5..9899c37 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-11-27 Bernd Schmidt <bernds_cb1@t-online.de> + + * 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 <rguenther@suse.de> * target.def (TARGET_VECTORIZE_BUILTIN_CONVERSION): Remove. diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 8d010eb..4b30c40 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 25e0b73..454f822 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")]) |