Commit e52e05ca by Michael Meissner

Do not move float values through memory to get to/from gp registers if -msoft-float.

From-SVN: r9242
parent 515f0e72
......@@ -3901,11 +3901,11 @@
[(set_attr "type" "*,*,*,compare,*,*,load,*")
(set_attr "length" "*,*,12,*,8,*,*,*")])
;; For floating-point, we normally deal with the floating-point registers.
;; The sole exception is that parameter passing can produce floating-point
;; values in fixed-point registers. Unless the value is a simple constant
;; or already in memory, we deal with this by allocating memory and copying
;; the value explicitly via that memory location.
;; For floating-point, we normally deal with the floating-point registers
;; unless -msoft-float is used. The sole exception is that parameter passing
;; can produce floating-point values in fixed-point registers. Unless the
;; value is a simple constant or already in memory, we deal with this by
;; allocating memory and copying the value explicitly via that memory location.
(define_expand "movsf"
[(set (match_operand:SF 0 "nonimmediate_operand" "")
(match_operand:SF 1 "any_operand" ""))]
......@@ -3923,6 +3923,8 @@
&& REGNO (SUBREG_REG (operands[1])) < FIRST_PSEUDO_REGISTER)
operands[1] = alter_subreg (operands[1]);
if (TARGET_HARD_FLOAT)
{
if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) < 32)
{
/* If this is a store to memory or another integer register do the
......@@ -3989,6 +3991,7 @@
DONE;
}
}
}
if (CONSTANT_P (operands[1]))
{
......
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