patch to div_trap_mips16

Gavin Romig-Koch gavin@cygnus.com
Thu Jan 21 11:05:00 GMT 1999


There are no delay slots after a MIPS16 branch.


	* config/mips/mips.md (div_trap_mips16): Remove nop's after branches.


Index: gcc/config/mips/mips.md
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mips/mips.md,v
retrieving revision 1.48
diff -c -r1.48 mips.md
*** gcc/config/mips/mips.md	1999/01/18 09:10:44	1.48
--- gcc/config/mips/mips.md	1999/01/21 19:00:08
***************
*** 2490,2504 ****
        have_dep_anti = 1;
    if (! have_dep_anti)
      {
        if (GET_CODE (operands[1]) == CONST_INT)
!         return \"%(bnez\\t%0,1f\\n\\tnop\\n\\tbreak\\t%2\\n1:%)\";
        else
!         return \"%(bne\\t%0,%1,1f\\n\\tnop\\n\\tbreak\\t%2\\n1:%)\";
      }
    return \"\";
  }"
    [(set_attr "type" "unknown")
!    (set_attr "length" "4")])
  
  (define_expand "divsi3"
    [(set (match_operand:SI 0 "register_operand" "=l")
--- 2490,2505 ----
        have_dep_anti = 1;
    if (! have_dep_anti)
      {
+       /* No branch delay slots on mips16. */ 
        if (GET_CODE (operands[1]) == CONST_INT)
!         return \"%(bnez\\t%0,1f\\n\\tbreak\\t%2\\n1:%)\";
        else
!         return \"%(bne\\t%0,%1,1f\\n\\tbreak\\t%2\\n1:%)\";
      }
    return \"\";
  }"
    [(set_attr "type" "unknown")
!    (set_attr "length" "3")])
  
  (define_expand "divsi3"
    [(set (match_operand:SI 0 "register_operand" "=l")



More information about the Gcc-patches mailing list