Commit 9f309ba3 by Jeff Law

pa.md (reload_insi, [...]): Use new "Z" constraint instead of "z" constraint.

	* pa.md (reload_insi, reload_outsi): Use new "Z" constraint instead
	of "z" constraint.
	(load HIGH patterns): Rewrite to not show DP relocation.

From-SVN: r3185
parent 4e82968e
...@@ -729,7 +729,7 @@ ...@@ -729,7 +729,7 @@
;; going in to or out of float point registers. ;; going in to or out of float point registers.
(define_expand "reload_insi" (define_expand "reload_insi"
[(set (match_operand:SI 0 "register_operand" "=z") [(set (match_operand:SI 0 "register_operand" "=Z")
(match_operand:SI 1 "general_operand" "")) (match_operand:SI 1 "general_operand" ""))
(clobber (match_operand:SI 2 "register_operand" "=&r"))] (clobber (match_operand:SI 2 "register_operand" "=&r"))]
"" ""
...@@ -745,7 +745,7 @@ ...@@ -745,7 +745,7 @@
(define_expand "reload_outsi" (define_expand "reload_outsi"
[(set (match_operand:SI 0 "general_operand" "") [(set (match_operand:SI 0 "general_operand" "")
(match_operand:SI 1 "register_operand""z")) (match_operand:SI 1 "register_operand" "Z"))
(clobber (match_operand:SI 2 "register_operand" "=&r"))] (clobber (match_operand:SI 2 "register_operand" "=&r"))]
"" ""
" "
...@@ -895,37 +895,34 @@ ...@@ -895,37 +895,34 @@
[(set_attr "type" "move") [(set_attr "type" "move")
(set_attr "length" "1")]) (set_attr "length" "1")])
(define_insn "" ;; For kernel code always use addil; else we can lose due to a linker
[(set (match_operand:SI 0 "register_operand" "=a,&?*r") ;; bug involving absolute symbols and "ldil;add" style relocations
(plus:SI (match_operand:SI 1 "register_operand" "r,r")
(high:SI (match_operand 2 "" ""))))]
"!TARGET_KERNEL"
"@
addil L'%G2,%1
ldil L'%G2,%0\;add %0,%1,%0"
[(set_attr "type" "binary,binary")
(set_attr "length" "1,2")])
(define_insn "" (define_insn ""
[(set (match_operand:SI 0 "register_operand" "=a") [(set (match_operand:SI 0 "register_operand" "=a")
(plus:SI (match_operand:SI 1 "register_operand" "r") (high:SI (match_operand 1 "" "")))]
(high:SI (match_operand 2 "" ""))))] "TARGET_KERNEL && symbolic_operand(operands[1], Pmode)
"TARGET_KERNEL" && ! function_label_operand (operands[1])
&& ! read_only_operand (operands[1])"
"@ "@
addil L'%G2,%1" addil L'%G1,%%r27"
[(set_attr "type" "binary") [(set_attr "type" "binary")
(set_attr "length" "1")]) (set_attr "length" "1")])
(define_split ;; For all symbolic operands *except* function addresses and read-only
[(set (match_operand:SI 0 "register_operand" "") ;; operands (which live in TEXT space and do not require relocation).
(plus:SI (match_operand:SI 1 "register_operand" "") (define_insn ""
(high:SI (match_operand 2 "" "")))) [(set (match_operand:SI 0 "register_operand" "=a,!*r")
(clobber (match_scratch:SI 3 ""))] (high:SI (match_operand 1 "" "")))]
"reload_completed && REGNO (operands[0]) != 1" "! TARGET_KERNEL && symbolic_operand(operands[1], Pmode)
[(set (match_dup 3) (high:SI (match_dup 2))) && ! function_label_operand (operands[1])
(set (match_dup 0) (plus:SI (match_dup 3) (match_dup 1)))] && ! read_only_operand (operands[1])"
"") "@
addil L'%G1,%%r27
ldil L'%G1,%0\;add %0,%%r27,%0"
[(set_attr "type" "binary,binary")
(set_attr "length" "1,2")])
;; For function addresses when TARGET_SHARED_LIBS
(define_insn "" (define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r") [(set (match_operand:SI 0 "register_operand" "=r")
(high:SI (match_operand:SI 1 "function_label_operand" "")))] (high:SI (match_operand:SI 1 "function_label_operand" "")))]
...@@ -934,6 +931,8 @@ ...@@ -934,6 +931,8 @@
[(set_attr "type" "move") [(set_attr "type" "move")
(set_attr "length" "1")]) (set_attr "length" "1")])
;; The following two patterns should be for using ldil to load constants
;; (which include addresses of read_only_operands)
(define_insn "" (define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r") [(set (match_operand:SI 0 "register_operand" "=r")
(high:SI (match_operand 1 "" "")))] (high:SI (match_operand 1 "" "")))]
...@@ -950,6 +949,7 @@ ...@@ -950,6 +949,7 @@
[(set_attr "type" "move") [(set_attr "type" "move")
(set_attr "length" "1")]) (set_attr "length" "1")])
;; lo_sum of a function address when TARGET_SHARED_LIBS
(define_insn "" (define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r") [(set (match_operand:SI 0 "register_operand" "=r")
(lo_sum:SI (match_operand:SI 1 "register_operand" "r") (lo_sum:SI (match_operand:SI 1 "register_operand" "r")
......
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