]> sourceware.org Git - cgen.git/commitdiff
PR 20946
authorAlan Modra <amodra@gmail.com>
Thu, 13 Apr 2017 11:58:48 +0000 (11:58 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 13 Apr 2017 11:58:48 +0000 (11:58 +0000)
* desc-cpu.scm (lookup_mach_via_bfd_name): Return NULL if the name
could not be matched.
(@arch@_cgen_cpu_open): Allow for lookup_mach_via_bfd_name returning

ChangeLog
desc-cpu.scm

index eaaaa79dfced341e2cc98948f9dd23307dccac91..4741f3ba01e300c5937da92dda354fd28c6707bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-04-13  Alan Modra  <amodra@gmail.com>
+
+       PR 20946
+       * desc-cpu.scm (lookup_mach_via_bfd_name): Return NULL if the name
+       could not be matched.
+       (@arch@_cgen_cpu_open): Allow for lookup_mach_via_bfd_name returning
+       NULL.
+
 2017-04-08  Alan Modra  <amodra@gmail.com>
 
        * utils.scm: Update emitted copyright dates.
index 521c94afcabf1bb1febfe8cd2b2e4e9821362796..d67cb12c52d30f17f26eb844d75ffbcc6d053b39 100644 (file)
@@ -606,7 +606,7 @@ lookup_mach_via_bfd_name (const CGEN_MACH *table, const char *name)
        return table;
       ++table;
     }
-  abort ();
+  return NULL;
 }
 
 /* Subroutine of @arch@_cgen_cpu_open to build the hardware table.  */
@@ -820,7 +820,8 @@ CGEN_CPU_DESC
            const CGEN_MACH *mach =
              lookup_mach_via_bfd_name (@arch@_cgen_mach_table, name);
 
-           machs |= 1 << mach->num;
+           if (mach != NULL)
+             machs |= 1 << mach->num;
            break;
          }
        case CGEN_CPU_OPEN_ENDIAN :
This page took 0.032006 seconds and 5 git commands to generate.