diff options
author | Richard Stallman <rms@gnu.org> | 1993-04-29 16:59:21 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-04-29 16:59:21 +0000 |
commit | 503e4b87f21d69aa28c8c0d9eedd08b66b273dc9 (patch) | |
tree | 97dbb6ef2c3f986192706d27a8b6d88555074168 /gcc | |
parent | 2505bc9700f24c9e1478c19822fd82c0f5c6f9e9 (diff) | |
download | gcc-503e4b87f21d69aa28c8c0d9eedd08b66b273dc9.zip gcc-503e4b87f21d69aa28c8c0d9eedd08b66b273dc9.tar.gz gcc-503e4b87f21d69aa28c8c0d9eedd08b66b273dc9.tar.bz2 |
(movxf): Add pattern for soft-float moves.
From-SVN: r4275
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/m68k/m68k.md | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index ef98e56..77daee4 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -1091,7 +1091,7 @@ (define_expand "movxf" [(set (match_operand:XF 0 "nonimmediate_operand" "") (match_operand:XF 1 "general_operand" ""))] - "TARGET_68881" + "" " { if (CONSTANT_P (operands[1])) @@ -1140,6 +1140,47 @@ } ") +(define_insn "" + [(set (match_operand:XF 0 "nonimmediate_operand" "=rm,&rf,&rof<>") + (match_operand:XF 1 "nonimmediate_operand" "rf,m,rof<>"))] + "! TARGET_68881" + "* +{ + if (FP_REG_P (operands[0])) + { + if (FP_REG_P (operands[1])) + return \"fmove%.x %1,%0\"; + if (REG_P (operands[1])) + { + rtx xoperands[2]; + xoperands[1] = gen_rtx (REG, SImode, REGNO (operands[1]) + 2); + output_asm_insn (\"move%.l %1,%-\", xoperands); + xoperands[1] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1); + output_asm_insn (\"move%.l %1,%-\", xoperands); + output_asm_insn (\"move%.l %1,%-\", operands); + return \"fmove%.x %+,%0\"; + } + if (GET_CODE (operands[1]) == CONST_DOUBLE) + return \"fmove%.x %1,%0\"; + return \"fmove%.x %f1,%0\"; + } + if (FP_REG_P (operands[1])) + { + if (REG_P (operands[0])) + { + output_asm_insn (\"fmove%.x %f1,%-\;move%.l %+,%0\", operands); + operands[0] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + output_asm_insn (\"move%.l %+,%0\", operands); + operands[0] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); + return \"move%.l %+,%0\"; + } + else + return \"fmove%.x %f1,%0\"; + } + return output_move_double (operands); +} +") + ;; movdi can apply to fp regs in some cases (define_insn "movdi" ;; Let's see if it really still needs to handle fp regs, and, if so, why. |