sh4: fix use_icount with linux-user
PATCH v2 1/1 sh4: fix use_icount with linux-user
This fixes java in a linux-user chroot:
$ java --version qemu-sh4: .../accel/tcg/cpu-exec.c:634: cpu_loop_exec_tb: Assertion `use_icount' failed. qemu: uncaught target signal 6 (Aborted) - core dumped Aborted (core dumped)
In gen_conditional_jump() in the GUSA_EXCLUSIVE part, we must reset base.is_jmp to DISAS_NEXT after the gen_goto_tb() as it is done in gen_delayed_conditional_jump() after the gen_jump().
("target/sh4: Convert to DisasJumpType")
---
Notes:
v2:
don't revert the part of the original patch, but fixes the state problem in gen_conditional_jump()
target/sh4/translate.c | 1 + 1 file changed, 1 insertion(+)
target/sh4/translate.c +1 -0
@@ -293,6 +293,7 @@ static void gen_conditional_jump(DisasContext *ctx, target_ulong dest,disallow it in use_goto_tb, but it handles exit + singlestep. */ gen_goto_tb (ctx,0 , dest);gen_set_label (l1); + ctx->base.is_jmp =DISAS_NEXT ;return ; }
Signature · 1 line
2.17.1
Quoted 10 lines · Laurent Vivier
This fixes java in a linux-user chroot:
$ java --version qemu-sh4: .../accel/tcg/cpu-exec.c:634: cpu_loop_exec_tb: Assertion `use_icount' failed. qemu: uncaught target signal 6 (Aborted) - core dumped Aborted (core dumped)In
gen_conditional_jump()in theGUSA_EXCLUSIVEpart, we must reset base.is_jmp toDISAS_NEXTafter thegen_goto_tb()as it is done ingen_delayed_conditional_jump()after thegen_jump().
Quoted 5 lines
Fixes 4834871bc95b67343248100e2a75ae0d287bc08b("target/sh4: Convert to DisasJumpType")
Reported-by John Paul Adrian Glaubitz <[email protected]>Signed-off-by Laurent Vivier <[email protected]>
Thanks, testing this revision now as well.
Both patches finally allow me to use much newer QEMU versions for SH4, before that I was stuck to versions from before the regression was introduced.
So far, the overall improvement is quite spectacular and even the Haskell compiler GHC now works much more reliable on qemu-sh4 than it did in the past.
Adrian
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer - [email protected] `. `' Freie Universitaet Berlin - [email protected] `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Quoted 13 lines · Laurent Vivier
This fixes java in a linux-user chroot:
$ java --version qemu-sh4: .../accel/tcg/cpu-exec.c:634: cpu_loop_exec_tb: Assertion `use_icount' failed. qemu: uncaught target signal 6 (Aborted) - core dumped Aborted (core dumped)In
gen_conditional_jump()in theGUSA_EXCLUSIVEpart, we must reset base.is_jmp toDISAS_NEXTafter thegen_goto_tb()as it is done ingen_delayed_conditional_jump()after thegen_jump().Fixes 4834871bc95b67343248100e2a75ae0d287bc08b("target/sh4: Convert to DisasJumpType")
Quoted 8 lines
Reported-by John Paul Adrian Glaubitz <[email protected]>Signed-off-by Laurent Vivier <[email protected]>---
Notes:
v2:
don't revert the part of the original patch, but fixes the state problem ingen_conditional_jump()
r~
Le 11/08/2018 à 17:26, Richard Henderson a écrit :
Quoted 18 lines · Laurent Vivier
Quoted 17 lines
This fixes java in a linux-user chroot:
$ java --version qemu-sh4: .../accel/tcg/cpu-exec.c:634: cpu_loop_exec_tb: Assertion `use_icount' failed. qemu: uncaught target signal 6 (Aborted) - core dumped Aborted (core dumped)In
gen_conditional_jump()in theGUSA_EXCLUSIVEpart, we must reset base.is_jmp toDISAS_NEXTafter thegen_goto_tb()as it is done ingen_delayed_conditional_jump()after thegen_jump().Fixes 4834871bc95b67343248100e2a75ae0d287bc08b("target/sh4: Convert to DisasJumpType")
Reported-by John Paul Adrian Glaubitz <[email protected]>Signed-off-by Laurent Vivier <[email protected]>---
Quoted 6 lines
Quoted 4 lines
Notes:
v2:
don't revert the part of the original patch, but fixes the state problem ingen_conditional_jump()Reviewed-by Richard Henderson <[email protected]>
Aurélien,
do you agree if I push this patch through a linux-user pull request?
Thanks,
Laurent
Aurelien Jarno
Reviewed-byQuoted 25 lines · Laurent Vivier
Le 11/08/2018 à 17:26, Richard Henderson a écrit :
Quoted 24 lines · Laurent Vivier
Quoted 13 lines
This fixes java in a linux-user chroot:
$ java --version qemu-sh4: .../accel/tcg/cpu-exec.c:634: cpu_loop_exec_tb: Assertion `use_icount' failed. qemu: uncaught target signal 6 (Aborted) - core dumped Aborted (core dumped)In
gen_conditional_jump()in theGUSA_EXCLUSIVEpart, we must reset base.is_jmp toDISAS_NEXTafter thegen_goto_tb()as it is done ingen_delayed_conditional_jump()after thegen_jump().Fixes 4834871bc95b67343248100e2a75ae0d287bc08b("target/sh4: Convert to DisasJumpType")
Quoted 8 lines
Reported-by John Paul Adrian Glaubitz <[email protected]>Signed-off-by Laurent Vivier <[email protected]>---
Notes:
v2:
don't revert the part of the original patch, but fixes the state problem ingen_conditional_jump()Reviewed-by Richard Henderson <[email protected]>
Quoted 3 lines
Aurélien,
do you agree if I push this patch through a linux-user pull request?
Yes, that's fine with me.
Thanks,
Aurelien
Signature · 2 lines
Aurelien Jarno GPG: 4096R/1DDD8C9B [email protected] http://www.aurel32.net