This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
mips16 would schedule extended instructions in delay slots
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 07 Feb 2002 04:08:20 -0200
- Subject: mips16 would schedule extended instructions in delay slots
- Organization: GCC Team, Red Hat
This patch fixes a rather obvious bug. I'm checking this in, approved
by Mike Meissner.
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* config/mips/mips.md (define_delay) [mips16]: Adjust required
length.
Index: gcc/config/mips/mips.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.md,v
retrieving revision 1.113
diff -u -p -r1.113 mips.md
--- gcc/config/mips/mips.md 2001/12/04 06:30:02 1.113
+++ gcc/config/mips/mips.md 2002/02/07 04:45:46
@@ -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)])
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer