[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 1008728] Re: Program counter is wrong when re-enter tb
[Qemu-devel] [Bug 1008728] Re: Program counter is wrong when re-enter tb_find_fast in SH4 CPU
Mon, 04 Jun 2012 21:14:21 -0000
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
Program counter is wrong when re-enter tb_find_fast in SH4 CPU
Status in QEMU:
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
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
To manage notifications about this bug go to:
|[Prev in Thread]
||[Next in Thread]|