base/regdump.c: Be helpful about VFP/NEON registers before `regdump_init'.
[catacomb] / base / regdump.c
index 2fc0f99..c591fd5 100644 (file)
@@ -857,6 +857,13 @@ void regdump(const void *base, const char *lbl, uint32 f)
     case REGSRC_FP:
     case REGSRC_SIMD:
       map = (const struct regmap *)base;
+      if (!map->fp) {
+       printf(";;");
+       if (lbl) printf(" %s:", lbl);
+       if (reg) printf(" %s =", reg);
+       printf(" #<not available -- regdump_init?>\n");
+       return;
+      }
       if (ix == REGIX_FPSCR) {
        assert(!(f&REGF_FMTMASK));
        dump_fpflags(lbl, map->fp->fpscr);