mips.c (mips_conditional_register_usage): Handle the DSP control register.
authorCatherine Moore <clm@codesourcery.com>
Mon, 3 Nov 2008 23:55:25 +0000 (18:55 -0500)
committerCatherine Moore <clm@gcc.gnu.org>
Mon, 3 Nov 2008 23:55:25 +0000 (18:55 -0500)
        * config/mips.c (mips_conditional_register_usage):  Handle the
        DSP control register.
        * doc/extend.texi: Document the DSP control register.

From-SVN: r141568

gcc/ChangeLog
gcc/config/mips/mips.c
gcc/doc/extend.texi

index 0d698b9948c3707e9e4335d6fbf2c79dcc7dc86e..ea8aed427e6f43f2621dfc18f17e5d53267685ea 100644 (file)
@@ -1,3 +1,9 @@
+2008-11-03  Catherine Moore  <clm@codesourcery.com>
+
+       * config/mips.c (mips_conditional_register_usage):  Handle the
+       DSP control register.
+       * doc/extend.texi: Document the DSP control register.
+                           
 2008-11-03  Steve Ellcey <sje@cup.hp.com>
            Jakub Jelinek  <jakub@redhat.com>
 
index f566e03155bc3e5d873f3aba54b7bbff67047714..fa78c8bf270e0f3aa9166ef3813c38ab5825cf58 100644 (file)
@@ -14019,7 +14019,14 @@ mips_swap_registers (unsigned int i)
 void
 mips_conditional_register_usage (void)
 {
-  if (!ISA_HAS_DSP)
+
+  if (ISA_HAS_DSP)
+    {
+      /* These DSP control register fields are global.  */
+      global_regs[CCDSP_PO_REGNUM] = 1;
+      global_regs[CCDSP_SC_REGNUM] = 1;
+    }
+  else 
     {
       int regno;
 
index da9c1daacdcbcd0eaf5346158ffaa08eae42598c..e03eaf9faad81a4cc6fa1faf76382d41900c703c 100644 (file)
@@ -8698,6 +8698,12 @@ otherwise backwards-compatible with it.  You can select revision 2
 using the command-line option @option{-mdspr2}; this option implies
 @option{-mdsp}.
 
+The SCOUNT and POS bits of the DSP control register are global.  The
+WRDSP, EXTPDP, EXTPDPV and MTHLIP instructions modify the SCOUNT and
+POS bits.  During optimization, the compiler will not delete these
+instructions and it will not delete calls to functions containing
+these instructions.
+
 At present, GCC only provides support for operations on 32-bit
 vectors.  The vector type associated with 8-bit integer data is
 usually called @code{v4i8}, the vector type associated with Q7