]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove tic4x_scan always false condition
authorAlan Modra <amodra@gmail.com>
Wed, 1 Oct 2025 03:59:27 +0000 (13:29 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 1 Oct 2025 13:22:33 +0000 (22:52 +0930)
The numeric check was always false, and correcting it to match the
comment causes lots of testsuite failures.  "tic4x" is a valid string.

* cpu-tic4x.c (tic4x_scan): Remove always false condition.
Fix comment.

bfd/cpu-tic4x.c

index 0cfacf3c0eb31d769d271d83be5ce511b0c964d7..e154b8fa3f09bfbdb950ace2fc693bffda096243 100644 (file)
@@ -28,15 +28,12 @@ static bool
 tic4x_scan (const struct bfd_arch_info *info,
            const char *string)
 {
-  /* Allow strings of form [ti][Cc][34][0-9], let's not be too picky
+  /* Allow strings of form [ti][Cc][34], let's not be too picky
      about strange numbered machines in C3x or C4x series.  */
   if (string[0] == 't' && string[1] == 'i')
     string += 2;
   if (*string == 'C' || *string == 'c')
     string++;
-  if (string[1] < '0' && string[1] > '9')
-    return false;
-
   if (*string == '3')
     return (info->mach == bfd_mach_tic3x);
   else if (*string == '4')