From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QM1tQ-0002qN-Qf for qemu-devel@nongnu.org; Mon, 16 May 2011 13:47:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QM1tP-0005FP-RH for qemu-devel@nongnu.org; Mon, 16 May 2011 13:47:44 -0400 Received: from mail-iy0-f173.google.com ([209.85.210.173]:34392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QM1tP-0005FB-OG for qemu-devel@nongnu.org; Mon, 16 May 2011 13:47:43 -0400 Received: by iym10 with SMTP id 10so4655368iym.4 for ; Mon, 16 May 2011 10:47:42 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110516172926.GA6132@volta.aurel32.net> References: <1303401708-5419-1-git-send-email-peter.maydell@linaro.org> <20110514213247.GB13600@volta.aurel32.net> <201105161710.59650.paul@codesourcery.com> <20110516172926.GA6132@volta.aurel32.net> Date: Mon, 16 May 2011 18:47:42 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 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: patches@linaro.org, Paul Brook , qemu-devel@nongnu.org On 16 May 2011 18:29, Aurelien Jarno wrote: > On Mon, May 16, 2011 at 05:37:03PM +0100, Peter Maydell wrote: >> You can do this by calling GETPC() from the top level helper function >> though, right? [OK, we'd need to move the definition out of dyngen-exec.h.] > > No we don't need to move it out of dyngen-exec.h. dyngen-exec.h is > included in target-*/exec.h, as the softmmu helpers, which are included > in target-*/op_helper.c, call cpu_restore_state(). I meant, assuming we want to reduce the set of helpers which use the implicit-global-env (ie: back out the patches which made helpers other than op_helper.c include exec.h). At the moment you can't get GETPC() without also getting the global-env which means you have to be in a source file compiled with the right CFLAGS. Sorry for the lack of clarity. > For an actual usage of cpu_restore_state() outside of the softmmu > helpers, you can have a look at target-sh4/op-helper.c, which uses this > technique for raising most exceptions, and especially the FPU ones. Sure. It's in a file which has access to global-env, though. -- PMM