summaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.md
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-01 11:30:39 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-01 11:30:39 +0000
commitc4693b2ff38d0da641e53d65ccd93c4138540c42 (patch)
tree910907388b4240c84aab13d1cebe2b811ce9682f /gcc/config/mips/mips.md
parentb978eadc92fddd1393af6a1381bdcf8cae77b7d8 (diff)
downloadgcc-c4693b2ff38d0da641e53d65ccd93c4138540c42.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85405 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips/mips.md')
-rw-r--r--gcc/config/mips/mips.md17
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 586f12df177..7c6771dd749 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -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")])
;; Block moves, see mips.c for more details.
;; Argument 0 is the destination