OSDN Git Service

* config/mips/mips.md (clear_hazard): Rename to
authornemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Nov 2008 22:14:50 +0000 (22:14 +0000)
committernemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Nov 2008 22:14:50 +0000 (22:14 +0000)
clear_hazard_<mode>.  Use mode-specific addition.
(clear_cache): Rename gen_clear_hazard to gen_clear_hazard_si
or gen_clear_hazard_di depending on the size of Pmode.

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

gcc/ChangeLog
gcc/config/mips/mips.md

index 360d431..c54964b 100644 (file)
@@ -1,3 +1,10 @@
+2008-11-26  Adam Nemet  <anemet@caviumnetworks.com>
+
+       * config/mips/mips.md (clear_hazard): Rename to
+       clear_hazard_<mode>.  Use mode-specific addition.
+       (clear_cache): Rename gen_clear_hazard to gen_clear_hazard_si
+       or gen_clear_hazard_di depending on the size of Pmode.
+
 2008-11-26  DJ Delorie  <dj@redhat.com>
 
        * configure.ac: Test m32c-elf-gas for .loc.
 2008-11-26  DJ Delorie  <dj@redhat.com>
 
        * configure.ac: Test m32c-elf-gas for .loc.
index 046f6a7..21b76c5 100644 (file)
     {
       mips_expand_synci_loop (operands[0], operands[1]);
       emit_insn (gen_sync ());
     {
       mips_expand_synci_loop (operands[0], operands[1]);
       emit_insn (gen_sync ());
-      emit_insn (gen_clear_hazard ());
+      emit_insn (Pmode == SImode
+                ? gen_clear_hazard_si ()
+                : gen_clear_hazard_di ());
     }
   else if (mips_cache_flush_func && mips_cache_flush_func[0])
     {
     }
   else if (mips_cache_flush_func && mips_cache_flush_func[0])
     {
   "ISA_HAS_SYNCI"
   "rdhwr\t%0,$1")
 
   "ISA_HAS_SYNCI"
   "rdhwr\t%0,$1")
 
-(define_insn "clear_hazard"
+(define_insn "clear_hazard_<mode>"
   [(unspec_volatile [(const_int 0)] UNSPEC_CLEAR_HAZARD)
   [(unspec_volatile [(const_int 0)] UNSPEC_CLEAR_HAZARD)
-   (clobber (reg:SI 31))]
+   (clobber (reg:P 31))]
   "ISA_HAS_SYNCI"
 {
   return "%(%<bal\t1f\n"
          "\tnop\n"
   "ISA_HAS_SYNCI"
 {
   return "%(%<bal\t1f\n"
          "\tnop\n"
-         "1:\taddiu\t$31,$31,12\n"
+         "1:\t<d>addiu\t$31,$31,12\n"
          "\tjr.hb\t$31\n"
          "\tnop%>%)";
 }
          "\tjr.hb\t$31\n"
          "\tnop%>%)";
 }