Commit 503e4b87 by Richard Stallman

(movxf): Add pattern for soft-float moves.

From-SVN: r4275
parent 2505bc97
...@@ -1091,7 +1091,7 @@ ...@@ -1091,7 +1091,7 @@
(define_expand "movxf" (define_expand "movxf"
[(set (match_operand:XF 0 "nonimmediate_operand" "") [(set (match_operand:XF 0 "nonimmediate_operand" "")
(match_operand:XF 1 "general_operand" ""))] (match_operand:XF 1 "general_operand" ""))]
"TARGET_68881" ""
" "
{ {
if (CONSTANT_P (operands[1])) if (CONSTANT_P (operands[1]))
...@@ -1140,6 +1140,47 @@ ...@@ -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 ;; movdi can apply to fp regs in some cases
(define_insn "movdi" (define_insn "movdi"
;; Let's see if it really still needs to handle fp regs, and, if so, why. ;; Let's see if it really still needs to handle fp regs, and, if so, why.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment