(define_expand "movxf"
[(set (match_operand:XF 0 "nonimmediate_operand" "")
(match_operand:XF 1 "general_operand" ""))]
- "TARGET_68881"
+ ""
"
{
if (CONSTANT_P (operands[1]))
}
")
+(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.