Fix latent bug exposed by a gcc-3 bug fix.
authorJim Wilson <wilson@tuliptree.org>
Sat, 14 Apr 2001 03:51:40 +0000 (03:51 +0000)
committerJim Wilson <wilson@tuliptree.org>
Sat, 14 Apr 2001 03:51:40 +0000 (03:51 +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 873c16a69016c71312813891764eccabe80d7e30..749d89b8eed9f8a4f7b200332c892102c9f14651 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-13  Jakub Jelinek  <jakub@redhat.com>
 
        * config/obj-elf.c (obj_elf_change_section): Add entsize argument,
index a07ee7c76ae6f43f5fd333bbe5026034aa4dcbb9..1f85ee425f7c92dfc9f7a54bdf5ec7cf169e1afb 100644 (file)
@@ -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,