Commit bdc87462 by Torbjorn Granlund

(cacheflush): Split into dcacheflush and icacheflush.

Rewrite to use space regs correctly.

From-SVN: r5837
parent 13b457e7
...@@ -3362,10 +3362,22 @@ ...@@ -3362,10 +3362,22 @@
;; This is used by the trampoline code for nested functions. ;; This is used by the trampoline code for nested functions.
;; So long as the trampoline itself is less than 32 bytes this ;; So long as the trampoline itself is less than 32 bytes this
;; is sufficient. ;; is sufficient.
(define_insn "cacheflush"
(define_insn "dcacheflush"
[(unspec_volatile [(const_int 1)] 0) [(unspec_volatile [(const_int 1)] 0)
(use (mem:SI (match_operand:SI 0 "register_operand" "r"))) (use (mem:SI (match_operand:SI 0 "register_operand" "r")))
(use (mem:SI (match_operand:SI 1 "register_operand" "r")))] (use (mem:SI (match_operand:SI 1 "register_operand" "r")))]
"" ""
"fdc 0(0,%0)\;sync\;fic 0(0,%0)\;sync\;fdc 0(0,%1)\;sync\;fic 0(0,%1)\;sync\;nop\;nop\;nop\;nop\;nop\;nop\;nop" "fdc 0(0,%0)\;fdc 0(0,%1)\;sync"
[(set_attr "length" "60")]) [(set_attr "length" "12")])
(define_insn "icacheflush"
[(unspec_volatile [(const_int 2)] 0)
(use (mem:SI (match_operand:SI 0 "register_operand" "r")))
(use (mem:SI (match_operand:SI 1 "register_operand" "r")))
(use (match_operand:SI 2 "register_operand" "r"))
(clobber (match_operand:SI 3 "register_operand" "=&r"))
(clobber (match_operand:SI 4 "register_operand" "=&r"))]
""
"mfsp %%sr0,%4\;ldsid (0,%2),%3\;mtsp %3,%%sr0\;fic 0(%%sr0,%0)\;fic 0(%%sr0,%1)\;sync\;mtsp %4,%%sr0\;nop\;nop\;nop\;nop\;nop\;nop"
[(set_attr "length" "52")])
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