summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/mips/mips.md19
2 files changed, 21 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7560a0b671a..ca0e3951763 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-07 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/mips/mips.md (define_delay) [mips16]: Adjust required
+ length.
+
2002-02-06 Richard Henderson <rth@redhat.com>
PR c/5609
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 0a0fae45cd9..4eadada89e7 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -164,15 +164,28 @@
(eq (symbol_ref "mips16") (const_int 0)))
[(and (eq_attr "dslot" "no") (eq_attr "length" "4"))
(nil)
- (and (eq_attr "branch_likely" "yes") (and (eq_attr "dslot" "no") (eq_attr "length" "4")))])
+ (and (eq_attr "branch_likely" "yes")
+ (and (eq_attr "dslot" "no")
+ (eq_attr "length" "4")))])
(define_delay (eq_attr "type" "jump")
- [(and (eq_attr "dslot" "no") (eq_attr "length" "4"))
+ [(and (eq_attr "dslot" "no")
+ ;; ADJUST_INSN_LENGTH divides length by 2 on mips16, so cope
+ ;; with it here. It doesn't matter for branches above,
+ ;; because mips16 branches don't have delay slots anyway.
+ (ior (and (eq (symbol_ref "mips16") (const_int 0))
+ (eq_attr "length" "4"))
+ (and (ne (symbol_ref "mips16") (const_int 0))
+ (eq_attr "length" "2"))))
(nil)
(nil)])
(define_delay (and (eq_attr "type" "call") (eq_attr "abicalls" "no"))
- [(and (eq_attr "dslot" "no") (eq_attr "length" "4"))
+ [(and (eq_attr "dslot" "no")
+ (ior (and (eq (symbol_ref "mips16") (const_int 0))
+ (eq_attr "length" "4"))
+ (and (ne (symbol_ref "mips16") (const_int 0))
+ (eq_attr "length" "2"))))
(nil)
(nil)])