From: Aurelien Jarno <aurel32@debian.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1008728] Re: Program counter is wrong when re-enter tb_find_fast in SH4 CPU
Date: Sun, 09 Sep 2012 14:49:11 -0000 [thread overview]
Message-ID: <20120909144912.14063.15200.launchpad@soybean.canonical.com> (raw)
In-Reply-To: 20120604205543.21660.63790.malonedeb@wampee.canonical.com
** 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
prev parent reply other threads:[~2012-09-09 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120909144912.14063.15200.launchpad@soybean.canonical.com \
--to=aurel32@debian.org \
--cc=1008728@bugs.launchpad.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).