]> gcc.gnu.org Git - gcc.git/commitdiff
mips.md (cprestore): Provide two alternatives...
authorRichard Sandiford <rsandifo@redhat.com>
Sun, 1 Aug 2004 11:30:39 +0000 (11:30 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sun, 1 Aug 2004 11:30:39 +0000 (11:30 +0000)
* config/mips/mips.md (cprestore): Provide two alternatives, one for
an in-range offset and one for an out-of-range offset.  Wrap the latter
in .set macro/.set nomacro if it's inside a .set nomacro block.

From-SVN: r85405

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

index c47eb67d5862967d881ea1e3cd28ec56d733be6e..965c6556534708bf4a3b7ee55c155b964cc762a4 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-01  Richard Sandiford  <rsandifo@redhat.com>
+
+       * config/mips/mips.md (cprestore): Provide two alternatives, one for
+       an in-range offset and one for an out-of-range offset.  Wrap the latter
+       in .set macro/.set nomacro if it's inside a .set nomacro block.
+
 2004-08-01  Richard Sandiford  <rsandifo@redhat.com>
 
        * config/mips/mips-protos.h (mips_gp_save_slot): Remove.
index 586f12df1770de15a0a893304ab630540d59e1b2..7c6771dd74996d6d93630ae2edb28d095c9d7133 100644 (file)
@@ -4787,16 +4787,21 @@ dsrl\t%3,%3,1\n\
    (set_attr "mode"    "none")
    (set_attr "length"  "0")])
 
-;; Emit a .cprestore directive, which expands to a single store instruction.
-;; Note that we continue to use .cprestore for explicit reloc code so that
-;; jals inside inlines asms will work correctly.
+;; Emit a .cprestore directive, which normally expands to a single store
+;; instruction.  Note that we continue to use .cprestore for explicit reloc
+;; code so that jals inside inline asms will work correctly.
 (define_insn "cprestore"
-  [(unspec_volatile [(match_operand 0 "const_int_operand" "")]
+  [(unspec_volatile [(match_operand 0 "const_int_operand" "I,i")]
                    UNSPEC_CPRESTORE)]
   ""
-  ".cprestore\t%0"
+{
+  if (set_nomacro && which_alternative == 1)
+    return ".set\tmacro\;.cprestore\t%0\;.set\tnomacro";
+  else
+    return ".cprestore\t%0";
+}
   [(set_attr "type" "store")
-   (set_attr "length" "4")])
+   (set_attr "length" "4,12")])
 \f
 ;; Block moves, see mips.c for more details.
 ;; Argument 0 is the destination
This page took 0.079509 seconds and 5 git commands to generate.