target-mips: generate a reserved instruction exception on CPU without DSP
On CPU without DSP ASE support, a reserved instruction exception (instead of a DSP ASE sate disabled) should be generated. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
d75c135e6b
commit
ad153f153d
@ -1394,14 +1394,22 @@ static inline void check_cp1_registers(DisasContext *ctx, int regs)
|
|||||||
static inline void check_dsp(DisasContext *ctx)
|
static inline void check_dsp(DisasContext *ctx)
|
||||||
{
|
{
|
||||||
if (unlikely(!(ctx->hflags & MIPS_HFLAG_DSP))) {
|
if (unlikely(!(ctx->hflags & MIPS_HFLAG_DSP))) {
|
||||||
generate_exception(ctx, EXCP_DSPDIS);
|
if (ctx->insn_flags & ASE_DSP) {
|
||||||
|
generate_exception(ctx, EXCP_DSPDIS);
|
||||||
|
} else {
|
||||||
|
generate_exception(ctx, EXCP_RI);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void check_dspr2(DisasContext *ctx)
|
static inline void check_dspr2(DisasContext *ctx)
|
||||||
{
|
{
|
||||||
if (unlikely(!(ctx->hflags & MIPS_HFLAG_DSPR2))) {
|
if (unlikely(!(ctx->hflags & MIPS_HFLAG_DSPR2))) {
|
||||||
generate_exception(ctx, EXCP_DSPDIS);
|
if (ctx->insn_flags & ASE_DSP) {
|
||||||
|
generate_exception(ctx, EXCP_DSPDIS);
|
||||||
|
} else {
|
||||||
|
generate_exception(ctx, EXCP_RI);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user