0005-m68k-sqrt.patch 981 B

123456789101112131415161718192021222324252627282930313233
  1. From a0d8a166ceb234bbee2d5f97dff2c54c378c4b56 Mon Sep 17 00:00:00 2001
  2. From: Szabolcs Nagy <nsz@port70.net>
  3. Date: Mon, 24 May 2021 19:54:11 +0000
  4. Subject: [PATCH 5/5] m68k sqrt
  5. ---
  6. gcc/config/m68k/m68k.md | 4 ++--
  7. 1 file changed, 2 insertions(+), 2 deletions(-)
  8. diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
  9. index 59a456cd496..dbfddea41bd 100644
  10. --- a/gcc/config/m68k/m68k.md
  11. +++ b/gcc/config/m68k/m68k.md
  12. @@ -4174,13 +4174,13 @@
  13. (define_expand "sqrt<mode>2"
  14. [(set (match_operand:FP 0 "nonimmediate_operand" "")
  15. (sqrt:FP (match_operand:FP 1 "general_operand" "")))]
  16. - "TARGET_HARD_FLOAT"
  17. + "(TARGET_68881 && TARGET_68040) || TARGET_COLDFIRE_FPU"
  18. "")
  19. (define_insn "sqrt<mode>2_68881"
  20. [(set (match_operand:FP 0 "nonimmediate_operand" "=f")
  21. (sqrt:FP (match_operand:FP 1 "general_operand" "f<FP:dreg>m")))]
  22. - "TARGET_68881"
  23. + "TARGET_68881 && TARGET_68040"
  24. {
  25. if (FP_REG_P (operands[1]))
  26. return "f<FP:round>sqrt%.x %1,%0";
  27. --
  28. 2.31.1