On Mon, May 16, 2011 at 06:47:42PM +0100, Peter Maydell wrote: > On 16 May 2011 18:29, Aurelien Jarno <aurel...@aurel32.net> 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.
Well, I haven't tried, but it seems you can simply include dyngen-exec.h directly in the file you want. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurel...@aurel32.net http://www.aurel32.net