aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-30 01:12:29 +0000
committerRichard Stallman <rms@gnu.org>1993-05-30 01:12:29 +0000
commitae98fe096541c1e0c7fcf776d267dcbb3f6844b6 (patch)
tree230ff9411285ef37b7ff7408d8aeb61ae81343f7
parent7677ffa441be09b532d01eb5b0ee6cc5c2322375 (diff)
downloadgcc-ae98fe096541c1e0c7fcf776d267dcbb3f6844b6.zip
gcc-ae98fe096541c1e0c7fcf776d267dcbb3f6844b6.tar.gz
gcc-ae98fe096541c1e0c7fcf776d267dcbb3f6844b6.tar.bz2
(movdf for const_double): Handle loading a CONST_DOUBLE into general registers.
(movdf for const_double): Handle loading a CONST_DOUBLE into general registers. (movsf for const_double): Likewise. From-SVN: r4594
-rw-r--r--gcc/config/pa/pa.md42
1 files changed, 34 insertions, 8 deletions
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md
index 33e45be..6bce6d7 100644
--- a/gcc/config/pa/pa.md
+++ b/gcc/config/pa/pa.md
@@ -1348,16 +1348,23 @@
;; Floating point move insns
;; This pattern forces (set (reg:DF ...) (const_double ...))
-;; to be reloaded by putting the constant into memory.
-;; It must come before the more general movdf pattern.
-(define_insn ""
- [(set (match_operand:DF 0 "general_operand" "=fx")
- (match_operand:DF 1 "" "m"))]
+;; to be reloaded by putting the constant into memory when
+;; reg is a floating point register.
+;;
+;; For integer registers we use ldil;ldo to set the appropriate
+;; value.
+;;
+;; This must come before the movdf pattern, and it must be present
+;; to handle obscure reloading cases.
+(define_insn ""
+ [(set (match_operand:DF 0 "general_operand" "=?r,fx")
+ (match_operand:DF 1 "" "?E,m"))]
"GET_CODE (operands[1]) == CONST_DOUBLE
&& operands[1] != CONST0_RTX (DFmode)"
- "fldds%F1 %1,%0"
- [(set_attr "type" "fpload")
- (set_attr "length" "1")])
+ "* return (which_alternative == 0 ? output_move_double (operands)
+ : \" fldds%F1 %1,%0\");"
+ [(set_attr "type" "move,fpload")
+ (set_attr "length" "4,1")])
(define_expand "movdf"
[(set (match_operand:DF 0 "general_operand" "")
@@ -1522,6 +1529,25 @@
;; is not an "arith_operand".
[(set_attr "length" "1,2")])
+;; This pattern forces (set (reg:SF ...) (const_double ...))
+;; to be reloaded by putting the constant into memory when
+;; reg is a floating point register.
+;;
+;; For integer registers we use ldil;ldo to set the appropriate
+;; value.
+;;
+;; This must come before the movsf pattern, and it must be present
+;; to handle obscure reloading cases.
+(define_insn ""
+ [(set (match_operand:SF 0 "general_operand" "=?r,fx")
+ (match_operand:SF 1 "" "?E,m"))]
+ "GET_CODE (operands[1]) == CONST_DOUBLE
+ && operands[1] != CONST0_RTX (SFmode)"
+ "* return (which_alternative == 0 ? singlemove_string (operands)
+ : \" fldws%F1 %1,%0\");"
+ [(set_attr "type" "move,fpload")
+ (set_attr "length" "2,1")])
+
(define_expand "movsf"
[(set (match_operand:SF 0 "general_operand" "")
(match_operand:SF 1 "general_operand" ""))]