target/microblaze: Add the opcode-0x0-illegal CPU property

Add the opcode-0x0-illegal CPU property to control if the core
should trap opcode zero as illegal.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This commit is contained in:
Edgar E. Iglesias 2019-10-30 13:49:14 +01:00
parent 648db19685
commit 1ee1bd28fc
3 changed files with 7 additions and 2 deletions

View file

@ -1573,7 +1573,7 @@ static inline void decode(DisasContext *dc, uint32_t ir)
LOG_DIS("%8.8x\t", dc->ir);
if (ir == 0) {
trap_illegal(dc, dc->cpu->env.pvr.regs[2] & PVR2_OPCODE_0x0_ILL_MASK);
trap_illegal(dc, dc->cpu->cfg.opcode_0_illegal);
/* Don't decode nop/zero instructions any further. */
return;
}