From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QM0Nt-0005cR-Pg for qemu-devel@nongnu.org; Mon, 16 May 2011 12:11:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QM0Ns-0002IR-TI for qemu-devel@nongnu.org; Mon, 16 May 2011 12:11:05 -0400 Received: from mail.codesourcery.com ([38.113.113.100]:53747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QM0Ns-0002I0-Lv for qemu-devel@nongnu.org; Mon, 16 May 2011 12:11:04 -0400 From: Paul Brook Date: Mon, 16 May 2011 17:10:58 +0100 References: <1303401708-5419-1-git-send-email-peter.maydell@linaro.org> <20110514213247.GB13600@volta.aurel32.net> In-Reply-To: <20110514213247.GB13600@volta.aurel32.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201105161710.59650.paul@codesourcery.com> Subject: Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: Peter Maydell , qemu-devel@nongnu.org, patches@linaro.org > > I just spoke with Paul on IRC about this. In summary: > > * for a helper to cause an exception then it has (a) to make sure CPU > > > > state (pc, condflags) is sync'd before the call to the helper and (b) > > the helper has to be in a file with access to global env, because it > > needs to call cpu_loop_exit() > > I don't think (a) is true. It is possible to use the same way as for > load/store operations, that is call cpu_restore_state() before calling > cpu_loop_exit(). To call cpu_restore_state you need to know searched_pc. To find that you need to unwind the host stack all the way back to translated code. Paul