mips.md (define_delay): Adjust required length.
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 7 Feb 2002 06:09:11 +0000 (06:09 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 7 Feb 2002 06:09:11 +0000 (06:09 +0000)
* config/mips/mips.md (define_delay) [mips16]: Adjust required
length.

From-SVN: r49567

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

index 7560a0b671a38a0e14104080126e0ed6d9c07fdc..ca0e3951763919ae606a62ea938913c47bf2ed9f 100644 (file)
@@ -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
index 0a0fae45cd9cf9533c24ad7579434d624a2cbcdb..4eadada89e74207ba39ef56f0d3a470e2b223fef 100644 (file)
                   (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)])