diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-08-19 17:29:59 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2013-08-19 17:29:59 +0000 |
commit | cfbf3ee885e20ad736d606a658d53e34fc05db60 (patch) | |
tree | 76fce6ee4a0f6457a8ea8967c4c8aae88c6f1316 /gcc | |
parent | d3136aeb7ad9f6eb50c97a9e66e46b6f728ef5a4 (diff) | |
download | gcc-cfbf3ee885e20ad736d606a658d53e34fc05db60.zip gcc-cfbf3ee885e20ad736d606a658d53e34fc05db60.tar.gz gcc-cfbf3ee885e20ad736d606a658d53e34fc05db60.tar.bz2 |
mips.c (mips_adjust_insn_length): Add checks for JUMP_P and INSN_P.
gcc/
* config/mips/mips.c (mips_adjust_insn_length): Add checks for
JUMP_P and INSN_P.
From-SVN: r201847
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dd6559d..8c96b96 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-08-19 Richard Sandiford <rdsandiford@googlemail.com> + + * config/mips/mips.c (mips_adjust_insn_length): Add checks for + JUMP_P and INSN_P. + 2013-08-19 Aldy Hernandez <aldyh@redhat.com> * doc/invoke.texi (-fcilkplus): Clarify that implementation is diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 4da80f4..5993aab 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: |