diff options
Diffstat (limited to 'contrib/gcc/jump.c')
-rw-r--r-- | contrib/gcc/jump.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/gcc/jump.c b/contrib/gcc/jump.c index 1a26b59..14baeed 100644 --- a/contrib/gcc/jump.c +++ b/contrib/gcc/jump.c @@ -1076,6 +1076,21 @@ simplejump_p (insn) && GET_CODE (SET_DEST (PATTERN (insn))) == PC && GET_CODE (SET_SRC (PATTERN (insn))) == LABEL_REF); } +/* Return 1 if INSN is an tablejump. */ + +int +tablejump_p (insn) + rtx insn; +{ + rtx table; + return (GET_CODE (insn) == JUMP_INSN + && JUMP_LABEL (insn) + && NEXT_INSN (JUMP_LABEL (insn)) + && (table = next_active_insn (JUMP_LABEL (insn))) + && GET_CODE (table) == JUMP_INSN + && (GET_CODE (PATTERN (table)) == ADDR_VEC + || GET_CODE (PATTERN (table)) == ADDR_DIFF_VEC)); +} /* Return nonzero if INSN is a (possibly) conditional jump and nothing more. |