From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAivc-0006vf-K0 for qemu-devel@nongnu.org; Sun, 09 Sep 2012 10:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAivb-0006cK-KU for qemu-devel@nongnu.org; Sun, 09 Sep 2012 10:56:04 -0400 Received: from indium.canonical.com ([91.189.90.7]:57808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAivb-0006cE-F6 for qemu-devel@nongnu.org; Sun, 09 Sep 2012 10:56:03 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TAiva-0001HW-CK for ; Sun, 09 Sep 2012 14:56:02 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 5C8D62E807E for ; Sun, 9 Sep 2012 14:56:02 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Sun, 09 Sep 2012 14:49:11 -0000 From: Aurelien Jarno Sender: bounces@canonical.com References: <20120604205543.21660.63790.malonedeb@wampee.canonical.com> Message-Id: <20120909144912.14063.15200.launchpad@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1008728] Re: Program counter is wrong when re-enter tb_find_fast in SH4 CPU Reply-To: Bug 1008728 <1008728@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ** Changed in: qemu Status: New =3D> 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 functio= n 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-leve= l. 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