From: rsandifo Date: Mon, 19 Aug 2013 17:29:59 +0000 (+0000) Subject: gcc/ X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c4dc247c17a42e80f65070bd99840e8e7d5ecf3;p=thirdparty%2Fgcc.git gcc/ * config/mips/mips.c (mips_adjust_insn_length): Add checks for JUMP_P and INSN_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201847 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dd6559d20171..8c96b96a9112 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-08-19 Richard Sandiford + + * config/mips/mips.c (mips_adjust_insn_length): Add checks for + JUMP_P and INSN_P. + 2013-08-19 Aldy Hernandez * doc/invoke.texi (-fcilkplus): Clarify that implementation is diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 4da80f42e7b2..5993aabe5781 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -12297,6 +12297,7 @@ mips_adjust_insn_length (rtx insn, int length) /* mips.md uses MAX_PIC_BRANCH_LENGTH as a placeholder for the length of a PIC long-branch sequence. Substitute the correct value. */ if (length == MAX_PIC_BRANCH_LENGTH + && JUMP_P (insn) && INSN_CODE (insn) >= 0 && get_attr_type (insn) == TYPE_BRANCH) { @@ -12318,7 +12319,9 @@ mips_adjust_insn_length (rtx insn, int length) length += TARGET_MIPS16 ? 2 : 4; /* See how many nops might be needed to avoid hardware hazards. */ - if (!cfun->machine->ignore_hazard_length_p && INSN_CODE (insn) >= 0) + if (!cfun->machine->ignore_hazard_length_p + && INSN_P (insn) + && INSN_CODE (insn) >= 0) switch (get_attr_hazard (insn)) { case HAZARD_NONE: