[ARC] Fix handling of cpu=... disassembler option value
[external/binutils.git] / opcodes / epiphany-desc.c
index 1b15e01..babe8d1 100644 (file)
@@ -1956,7 +1956,7 @@ lookup_mach_via_bfd_name (const CGEN_MACH *table, const char *name)
        return table;
       ++table;
     }
-  abort ();
+  return NULL;
 }
 
 /* Subroutine of epiphany_cgen_cpu_open to build the hardware table.  */
@@ -2170,7 +2170,8 @@ epiphany_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
            const CGEN_MACH *mach =
              lookup_mach_via_bfd_name (epiphany_cgen_mach_table, name);
 
-           machs |= 1 << mach->num;
+           if (mach != NULL)
+             machs |= 1 << mach->num;
            break;
          }
        case CGEN_CPU_OPEN_ENDIAN :