OSDN Git Service

(cacheflush): Split into dcacheflush and icacheflush.
authortege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Oct 1993 22:10:08 +0000 (22:10 +0000)
committertege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Oct 1993 22:10:08 +0000 (22:10 +0000)
Rewrite to use space regs correctly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5837 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/pa/pa.md

index e3bdef3..cb9247e 100644 (file)
 ;; This is used by the trampoline code for nested functions.
 ;; So long as the trampoline itself is less than 32 bytes this
 ;; is sufficient.
-(define_insn "cacheflush"
+
+(define_insn "dcacheflush"
   [(unspec_volatile [(const_int 1)] 0)
    (use (mem:SI (match_operand:SI 0 "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"
-  [(set_attr "length" "60")])
+  "fdc 0(0,%0)\;fdc 0(0,%1)\;sync"
+  [(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")])