mips fix
Jeffrey A Law
law@hurl.cygnus.com
Mon Mar 1 15:43:00 GMT 1999
It is possible for an insn (call it insn1) to have a dependency on a previous
insn (call it insn2) that is not an INSN. For example insn2 could be a
NOTE_INSN_DELETED.
Thus when walking the dependency list for insn1 we must not examine
the pattern of the link unless we know it is a JUMP_INSN, CALL_INSN or
INSN.
For this code in mips.md we only care about INSNs, so we do not bother
to check for CALL_INSN or JUMP_INSN.
* mips.md (div_trap_normal, div_trap_mips16): Require the dependent
insn to be an INSN before looking at its pattern.
Index: mips.md
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mips/mips.md,v
retrieving revision 1.53
diff -c -3 -p -r1.53 mips.md
*** mips.md 1999/02/04 07:51:51 1.53
--- mips.md 1999/03/01 23:39:34
***************
*** 2441,2446 ****
--- 2441,2447 ----
for (link = LOG_LINKS (insn); link; link = XEXP (link, 1))
if ((int) REG_DEP_ANTI == (int) REG_NOTE_KIND (link)
+ && GET_CODE (XEXP (link, 0)) == INSN
&& GET_CODE (PATTERN (XEXP (link, 0))) == TRAP_IF
&& REGNO (operands[1]) == 0)
have_dep_anti = 1;
***************
*** 2485,2490 ****
--- 2486,2492 ----
for (link = LOG_LINKS (insn); link; link = XEXP (link, 1))
if ((int) REG_DEP_ANTI == (int) REG_NOTE_KIND (link)
+ && GET_CODE (XEXP (link, 0)) == INSN
&& GET_CODE (PATTERN (XEXP (link, 0))) == TRAP_IF
&& REGNO (operands[1]) == 0)
have_dep_anti = 1;
More information about the Gcc-patches
mailing list