* 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
+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.
return table;
++table;
}
- abort ();
+ return NULL;
}
/* Subroutine of @arch@_cgen_cpu_open to build the hardware table. */
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 :