mirror of https://github.com/xemu-project/xemu.git
target-mips: fix semihosting for microMIPS R6
In semihosting mode the SDBBP 1 instructions should trigger UHI syscall, but in QEMU this does not happen for recently added microMIPS R6. Consequently bare metal microMIPS R6 programs supporting UHI will not run. Signed-off-by: Leon Alrae <leon.alrae@imgtec.com> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
e95edefbd0
commit
060ebfef1a
|
@ -13278,10 +13278,14 @@ static void gen_pool16c_r6_insn(DisasContext *ctx)
|
||||||
break;
|
break;
|
||||||
case R6_SDBBP16:
|
case R6_SDBBP16:
|
||||||
/* SDBBP16 */
|
/* SDBBP16 */
|
||||||
if (ctx->hflags & MIPS_HFLAG_SBRI) {
|
if (is_uhi(extract32(ctx->opcode, 6, 4))) {
|
||||||
generate_exception(ctx, EXCP_RI);
|
gen_helper_do_semihosting(cpu_env);
|
||||||
} else {
|
} else {
|
||||||
generate_exception(ctx, EXCP_DBp);
|
if (ctx->hflags & MIPS_HFLAG_SBRI) {
|
||||||
|
generate_exception(ctx, EXCP_RI);
|
||||||
|
} else {
|
||||||
|
generate_exception(ctx, EXCP_DBp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue