diff options
author | Jim Wilson <wilson@tuliptree.org> | 2001-04-14 03:51:40 +0000 |
---|---|---|
committer | Jim Wilson <wilson@tuliptree.org> | 2001-04-14 03:51:40 +0000 |
commit | 1deb8127a2a7099d84e4de49128aaeb0e5125b30 (patch) | |
tree | 25e40f572240f4869c840c12db4faa6b2183d116 /gas/config/tc-ia64.c | |
parent | baf80c32aec74040d4bdb3ad85997f2253e832f7 (diff) | |
download | gdb-1deb8127a2a7099d84e4de49128aaeb0e5125b30.zip gdb-1deb8127a2a7099d84e4de49128aaeb0e5125b30.tar.gz gdb-1deb8127a2a7099d84e4de49128aaeb0e5125b30.tar.bz2 |
Fix latent bug exposed by a gcc-3 bug fix.
* tc-ia64.c (is_conditional_branch): Return true for br, brl, and br.
excluding br.i.
Diffstat (limited to 'gas/config/tc-ia64.c')
-rw-r--r-- | gas/config/tc-ia64.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index a07ee7c..1f85ee4 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -6889,19 +6889,19 @@ ia64_canonicalize_symbol_name (name) return name; } +/* Return true if idesc is a conditional branch instruction. */ + static int is_conditional_branch (idesc) struct ia64_opcode *idesc; { - return (strncmp (idesc->name, "br", 2) == 0 - && (strcmp (idesc->name, "br") == 0 - || strncmp (idesc->name, "br.cond", 7) == 0 - || strncmp (idesc->name, "br.call", 7) == 0 - || strncmp (idesc->name, "br.ret", 6) == 0 - || strcmp (idesc->name, "brl") == 0 - || strncmp (idesc->name, "brl.cond", 7) == 0 - || strncmp (idesc->name, "brl.call", 7) == 0 - || strncmp (idesc->name, "brl.ret", 6) == 0)); + /* br is a conditional branch. Everything that starts with br. except + br.ia is a conditional branch. Everything that starts with brl is a + conditional branch. */ + return (idesc->name[0] == 'b' && idesc->name[1] == 'r' + && (idesc->name[2] == '\0' + || (idesc->name[2] == '.' && idesc->name[3] != 'i') + || idesc->name[2] == 'l')); } /* Return whether the given opcode is a taken branch. If there's any doubt, |