* [Qemu-devel] [Bug 1008728] [NEW] Program counter is wrong when re-enter tb_find_fast in SH4 CPU
@ 2012-06-04 20:55 S.P. Lu
2012-06-04 21:14 ` [Qemu-devel] [Bug 1008728] " S.P. Lu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: S.P. Lu @ 2012-06-04 20:55 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
Hi:
Recently, I use qemu-system-sh4 to emulate my legacy program (SH3).
But it goes wrong. After trace, I find when re-enter tb_find_fast function in file cpu-exec.c.
CPU program counter will be different with previous one.
In cpu-exec.c file, function tb_find_fast(env).
First, it will check whether the program counter address is in hash table.
(Mostly, jump address is in same hash entry. So it works normally.)
if yes, then execute tb_find_slow, then goes into decode...etc.
Otherwise, return NULL. (which is got from tb_jmp_cache.)
When first time, tb_find_fast return NULL.
Then in infinite loop in upper subroutine will call tb_find_fast again.
In 2nd time, the PC will be changed, different with previous one.
Then program goes wrong. At the end, it causes a forever loop in top-level.
Never goes into low-level function gen_intermediate_code_internal in file target-sh4/translate.c
Best Regards
S.P.Lu
** Affects: qemu
Importance: Undecided
Status: New
** Tags: sh4
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1008728
Title:
Program counter is wrong when re-enter tb_find_fast in SH4 CPU
Status in QEMU:
New
Bug description:
Hi:
Recently, I use qemu-system-sh4 to emulate my legacy program (SH3).
But it goes wrong. After trace, I find when re-enter tb_find_fast function in file cpu-exec.c.
CPU program counter will be different with previous one.
In cpu-exec.c file, function tb_find_fast(env).
First, it will check whether the program counter address is in hash table.
(Mostly, jump address is in same hash entry. So it works normally.)
if yes, then execute tb_find_slow, then goes into decode...etc.
Otherwise, return NULL. (which is got from tb_jmp_cache.)
When first time, tb_find_fast return NULL.
Then in infinite loop in upper subroutine will call tb_find_fast again.
In 2nd time, the PC will be changed, different with previous one.
Then program goes wrong. At the end, it causes a forever loop in top-level.
Never goes into low-level function gen_intermediate_code_internal in file target-sh4/translate.c
Best Regards
S.P.Lu
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1008728/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [Bug 1008728] Re: Program counter is wrong when re-enter tb_find_fast in SH4 CPU
2012-06-04 20:55 [Qemu-devel] [Bug 1008728] [NEW] Program counter is wrong when re-enter tb_find_fast in SH4 CPU S.P. Lu
@ 2012-06-04 21:14 ` S.P. Lu
2012-06-08 6:23 ` S.P. Lu
2012-09-09 14:49 ` Aurelien Jarno
2 siblings, 0 replies; 4+ messages in thread
From: S.P. Lu @ 2012-06-04 21:14 UTC (permalink / raw)
To: qemu-devel
configure --target-list=sh4-softmmu
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1008728
Title:
Program counter is wrong when re-enter tb_find_fast in SH4 CPU
Status in QEMU:
New
Bug description:
Hi:
Recently, I use qemu-system-sh4 to emulate my legacy program (SH3).
But it goes wrong. After trace, I find when re-enter tb_find_fast function in file cpu-exec.c.
CPU program counter will be different with previous one.
In cpu-exec.c file, function tb_find_fast(env).
First, it will check whether the program counter address is in hash table.
(Mostly, jump address is in same hash entry. So it works normally.)
if yes, then execute tb_find_slow, then goes into decode...etc.
Otherwise, return NULL. (which is got from tb_jmp_cache.)
When first time, tb_find_fast return NULL.
Then in infinite loop in upper subroutine will call tb_find_fast again.
In 2nd time, the PC will be changed, different with previous one.
Then program goes wrong. At the end, it causes a forever loop in top-level.
Never goes into low-level function gen_intermediate_code_internal in file target-sh4/translate.c
Best Regards
S.P.Lu
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1008728/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [Bug 1008728] Re: Program counter is wrong when re-enter tb_find_fast in SH4 CPU
2012-06-04 20:55 [Qemu-devel] [Bug 1008728] [NEW] Program counter is wrong when re-enter tb_find_fast in SH4 CPU S.P. Lu
2012-06-04 21:14 ` [Qemu-devel] [Bug 1008728] " S.P. Lu
@ 2012-06-08 6:23 ` S.P. Lu
2012-09-09 14:49 ` Aurelien Jarno
2 siblings, 0 replies; 4+ messages in thread
From: S.P. Lu @ 2012-06-08 6:23 UTC (permalink / raw)
To: qemu-devel
Hi:
I'm sorry. It is a mistake. Because program is SH3, the peripheral IO is not same as SH4.
So, it always in infinite loop.
Sorry.
S.P.LU
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1008728
Title:
Program counter is wrong when re-enter tb_find_fast in SH4 CPU
Status in QEMU:
New
Bug description:
Hi:
Recently, I use qemu-system-sh4 to emulate my legacy program (SH3).
But it goes wrong. After trace, I find when re-enter tb_find_fast function in file cpu-exec.c.
CPU program counter will be different with previous one.
In cpu-exec.c file, function tb_find_fast(env).
First, it will check whether the program counter address is in hash table.
(Mostly, jump address is in same hash entry. So it works normally.)
if yes, then execute tb_find_slow, then goes into decode...etc.
Otherwise, return NULL. (which is got from tb_jmp_cache.)
When first time, tb_find_fast return NULL.
Then in infinite loop in upper subroutine will call tb_find_fast again.
In 2nd time, the PC will be changed, different with previous one.
Then program goes wrong. At the end, it causes a forever loop in top-level.
Never goes into low-level function gen_intermediate_code_internal in file target-sh4/translate.c
Best Regards
S.P.Lu
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1008728/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [Bug 1008728] Re: Program counter is wrong when re-enter tb_find_fast in SH4 CPU
2012-06-04 20:55 [Qemu-devel] [Bug 1008728] [NEW] Program counter is wrong when re-enter tb_find_fast in SH4 CPU S.P. Lu
2012-06-04 21:14 ` [Qemu-devel] [Bug 1008728] " S.P. Lu
2012-06-08 6:23 ` S.P. Lu
@ 2012-09-09 14:49 ` Aurelien Jarno
2 siblings, 0 replies; 4+ messages in thread
From: Aurelien Jarno @ 2012-09-09 14:49 UTC (permalink / raw)
To: qemu-devel
** Changed in: qemu
Status: New => Invalid
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1008728
Title:
Program counter is wrong when re-enter tb_find_fast in SH4 CPU
Status in QEMU:
Invalid
Bug description:
Hi:
Recently, I use qemu-system-sh4 to emulate my legacy program (SH3).
But it goes wrong. After trace, I find when re-enter tb_find_fast function in file cpu-exec.c.
CPU program counter will be different with previous one.
In cpu-exec.c file, function tb_find_fast(env).
First, it will check whether the program counter address is in hash table.
(Mostly, jump address is in same hash entry. So it works normally.)
if yes, then execute tb_find_slow, then goes into decode...etc.
Otherwise, return NULL. (which is got from tb_jmp_cache.)
When first time, tb_find_fast return NULL.
Then in infinite loop in upper subroutine will call tb_find_fast again.
In 2nd time, the PC will be changed, different with previous one.
Then program goes wrong. At the end, it causes a forever loop in top-level.
Never goes into low-level function gen_intermediate_code_internal in file target-sh4/translate.c
Best Regards
S.P.Lu
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1008728/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-09 14:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-04 20:55 [Qemu-devel] [Bug 1008728] [NEW] Program counter is wrong when re-enter tb_find_fast in SH4 CPU S.P. Lu
2012-06-04 21:14 ` [Qemu-devel] [Bug 1008728] " S.P. Lu
2012-06-08 6:23 ` S.P. Lu
2012-09-09 14:49 ` Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).