aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/pa
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gnu.org>1993-10-20 22:10:08 +0000
committerTorbjorn Granlund <tege@gnu.org>1993-10-20 22:10:08 +0000
commitbdc87462e73937f06523adba73e993a0b11d2a47 (patch)
tree6d2bdaa72324ae186b7ca5ff8e70e4bec271c663 /gcc/config/pa
parent13b457e7e0d79ec4b1897fa270e06a209e3a9802 (diff)
downloadgcc-bdc87462e73937f06523adba73e993a0b11d2a47.zip
gcc-bdc87462e73937f06523adba73e993a0b11d2a47.tar.gz
gcc-bdc87462e73937f06523adba73e993a0b11d2a47.tar.bz2
(cacheflush): Split into dcacheflush and icacheflush.
Rewrite to use space regs correctly. From-SVN: r5837
Diffstat (limited to 'gcc/config/pa')
-rw-r--r--gcc/config/pa/pa.md18
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md
index e3bdef3..cb9247e 100644
--- a/gcc/config/pa/pa.md
+++ b/gcc/config/pa/pa.md
@@ -3362,10 +3362,22 @@
;; 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")])