aboutsummaryrefslogtreecommitdiff
path: root/gcc/jump.c
diff options
context:
space:
mode:
authorAdam Nemet <anemet@caviumnetworks.com>2009-06-08 18:49:17 +0000
committerAdam Nemet <nemet@gcc.gnu.org>2009-06-08 18:49:17 +0000
commit72e4821846ba8167ec54d24db555d24118e10191 (patch)
treea54c16abe8782b37cf4e643ee5d1ee6aa7e9e9ab /gcc/jump.c
parent6ce2002b031c923f028fc53cc1ba802483417113 (diff)
downloadgcc-72e4821846ba8167ec54d24db555d24118e10191.zip
gcc-72e4821846ba8167ec54d24db555d24118e10191.tar.gz
gcc-72e4821846ba8167ec54d24db555d24118e10191.tar.bz2
jump.c (returnjump_p): Handle delayed branches.
* jump.c (returnjump_p): Handle delayed branches. Add missing function comment. From-SVN: r148289
Diffstat (limited to 'gcc/jump.c')
-rw-r--r--gcc/jump.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index c3af16a..350de16 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -886,11 +886,18 @@ returnjump_p_1 (rtx *loc, void *data ATTRIBUTE_UNUSED)
}
}
+/* Return TRUE if INSN is a return jump. */
+
int
returnjump_p (rtx insn)
{
+ /* Handle delayed branches. */
+ if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE)
+ insn = XVECEXP (PATTERN (insn), 0, 0);
+
if (!JUMP_P (insn))
return 0;
+
return for_each_rtx (&PATTERN (insn), returnjump_p_1, NULL);
}