2015-02-20 15:18+0100, Radim Krčmář:
> diff --git a/hw/misc/milkymist-pfpu.c b/hw/misc/milkymist-pfpu.c
> @@ -164,6 +164,13 @@ output_queue_advance(MilkymistPFPUState *s)
>  static int pfpu_decode_insn(MilkymistPFPUState *s)
>  {
>      uint32_t pc = s->regs[R_PC];
> +
> +    if (pc > MICROCODE_WORDS) {

Ugh, should have been '>=' here.

> +        error_report("milkymist_pfpu: too many instructions "
> +                     "executed in microcode. No VECTOUT?");
> +        return 0;
> +    }
> +
>      uint32_t insn = s->microcode[pc];

Reply via email to