]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix latent bug exposed by a gcc-3 bug fix.
authorJim Wilson <wilson@tuliptree.org>
Sun, 15 Apr 2001 08:01:04 +0000 (08:01 +0000)
committerJim Wilson <wilson@tuliptree.org>
Sun, 15 Apr 2001 08:01:04 +0000 (08:01 +0000)
* tc-ia64.c (is_conditional_branch): Return true for br, brl, and br.
excluding br.i.

gas/ChangeLog
gas/config/tc-ia64.c

index 7f6a6292aba9581a30603d59d5d872b9272575b4..50955e3bc8046fb79af5fdafb7371fa16ef0c3a5 100644 (file)
@@ -1,3 +1,8 @@
+2001-04-13  Jim Wilson  <wilson@redhat.com>
+
+       * tc-ia64.c (is_conditional_branch): Return true for br, brl, and br.
+       excluding br.i.
+
 2001-04-02  Philip Blundell  <philb@gnu.org>
 
        From 2001-03-17  Richard Henderson  <rth@redhat.com>
index fab050a9dec51731fad22266f38fdf855746f440..b9e1684724593caea598019a60ff0d799117f7fd 100644 (file)
@@ -6869,19 +6869,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,