This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Tweak icacheflush pattern on PA


When I backported the trampoline fix in 3.[45], I had found that I had
to rearrange the operand order in the icacheflush pattern to avoid a
warning.  This eliminates an argument from gen_icacheflush.

Tested on hppa2.0-hp-hpux11.11 and hppa64-hp-hpux11.11.  Installed
to 3.[45].

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2004-03-06  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* pa.md (icacheflush): Reorder operands to make match_scratch operand
	last.
	* pa.h (INITIALIZE_TRAMPOLINE): Remove unnecessary scratch argument
	from calls to gen_icacheflush.

Index: config/pa/pa.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.md,v
retrieving revision 1.142
diff -u -2 -p -r1.142 pa.md
--- config/pa/pa.md	3 Feb 2004 06:43:53 -0000	1.142
+++ config/pa/pa.md	6 Mar 2004 18:51:41 -0000
@@ -8859,6 +8859,5 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 ;; Operand 1 contains the end address.
 ;; Operand 2 contains the line length to use.
-;; Operand 3 contains the start address (clobbered).
-;; Operands 4 and 5 (icacheflush) are clobbered scratch registers.
+;; Operands 3 and 4 (icacheflush) are clobbered scratch registers.
 (define_insn "dcacheflush"
   [(const_int 1)
@@ -8885,14 +8884,14 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
    (use (match_operand 1 "pmode_register_operand" "r"))
    (use (match_operand 2 "pmode_register_operand" "r"))
-   (clobber (match_scratch 3 "=&0"))
+   (clobber (match_operand 3 "pmode_register_operand" "=&r"))
    (clobber (match_operand 4 "pmode_register_operand" "=&r"))
-   (clobber (match_operand 5 "pmode_register_operand" "=&r"))]
+   (clobber (match_scratch 5 "=&0"))]
   ""
   "*
 {
   if (TARGET_64BIT)
-    return \"mfsp %%sr0,%5\;ldsid (%3),%4\;mtsp %4,%%sr0\;cmpb,*<<=,n %3,%1,.\;fic,m %2(%%sr0,%3)\;sync\;mtsp %5,%%sr0\;nop\;nop\;nop\;nop\;nop\;nop\";
+    return \"mfsp %%sr0,%4\;ldsid (%5),%3\;mtsp %3,%%sr0\;cmpb,*<<=,n %5,%1,.\;fic,m %2(%%sr0,%5)\;sync\;mtsp %4,%%sr0\;nop\;nop\;nop\;nop\;nop\;nop\";
   else
-    return \"mfsp %%sr0,%5\;ldsid (%3),%4\;mtsp %4,%%sr0\;cmpb,<<=,n %3,%1,.\;fic,m %2(%%sr0,%3)\;sync\;mtsp %5,%%sr0\;nop\;nop\;nop\;nop\;nop\;nop\";
+    return \"mfsp %%sr0,%4\;ldsid (%5),%3\;mtsp %3,%%sr0\;cmpb,<<=,n %5,%1,.\;fic,m %2(%%sr0,%5)\;sync\;mtsp %4,%%sr0\;nop\;nop\;nop\;nop\;nop\;nop\";
 }"
   [(set_attr "type" "multi")
Index: config/pa/pa.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.h,v
retrieving revision 1.216
diff -u -2 -p -r1.216 pa.h
--- config/pa/pa.h	25 Feb 2004 19:45:13 -0000	1.216
+++ config/pa/pa.h	6 Mar 2004 18:51:43 -0000
@@ -1097,5 +1097,4 @@ extern int may_call_alloca;
       emit_insn (gen_icacheflush (start_addr, end_addr, line_length,	\
 				  gen_reg_rtx (Pmode),			\
-				  gen_reg_rtx (Pmode),			\
 				  gen_reg_rtx (Pmode)));		\
     }									\
@@ -1129,5 +1128,4 @@ extern int may_call_alloca;
       emit_insn (gen_dcacheflush (start_addr, end_addr, line_length));	\
       emit_insn (gen_icacheflush (start_addr, end_addr, line_length,	\
-				  gen_reg_rtx (Pmode),			\
 				  gen_reg_rtx (Pmode),			\
 				  gen_reg_rtx (Pmode)));		\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]