* [Qemu-devel] [PATCH] target-mips: fix semihosting for microMIPS R6
@ 2015-08-03 12:01 Leon Alrae
2015-08-03 21:31 ` Aurelien Jarno
0 siblings, 1 reply; 2+ messages in thread
From: Leon Alrae @ 2015-08-03 12:01 UTC (permalink / raw)
To: qemu-devel; +Cc: aurelien
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>
---
target-mips/translate.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/target-mips/translate.c b/target-mips/translate.c
index d1de35a..e299643 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -13278,10 +13278,14 @@ static void gen_pool16c_r6_insn(DisasContext *ctx)
break;
case R6_SDBBP16:
/* SDBBP16 */
- if (ctx->hflags & MIPS_HFLAG_SBRI) {
- generate_exception(ctx, EXCP_RI);
+ if (is_uhi(extract32(ctx->opcode, 6, 4))) {
+ gen_helper_do_semihosting(cpu_env);
} else {
- generate_exception(ctx, EXCP_DBp);
+ if (ctx->hflags & MIPS_HFLAG_SBRI) {
+ generate_exception(ctx, EXCP_RI);
+ } else {
+ generate_exception(ctx, EXCP_DBp);
+ }
}
break;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] target-mips: fix semihosting for microMIPS R6
2015-08-03 12:01 [Qemu-devel] [PATCH] target-mips: fix semihosting for microMIPS R6 Leon Alrae
@ 2015-08-03 21:31 ` Aurelien Jarno
0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2015-08-03 21:31 UTC (permalink / raw)
To: Leon Alrae; +Cc: qemu-devel
On 2015-08-03 13:01, Leon Alrae wrote:
> 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>
> ---
> target-mips/translate.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-03 21:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-03 12:01 [Qemu-devel] [PATCH] target-mips: fix semihosting for microMIPS R6 Leon Alrae
2015-08-03 21:31 ` Aurelien Jarno
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.