From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56220 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTVV8-0002oL-2z for qemu-devel@nongnu.org; Tue, 29 Jun 2010 03:45:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTVV6-0002tE-VQ for qemu-devel@nongnu.org; Tue, 29 Jun 2010 03:45:01 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:53636) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTVV6-0002t2-Rd for qemu-devel@nongnu.org; Tue, 29 Jun 2010 03:45:00 -0400 Received: by vws14 with SMTP id 14so1845997vws.4 for ; Tue, 29 Jun 2010 00:45:00 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4C29A478.1080805@redhat.com> Date: Tue, 29 Jun 2010 09:44:56 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1277745445-30560-1-git-send-email-pbonzini@redhat.com> <1277745445-30560-5-git-send-email-pbonzini@redhat.com> <201006282129.34080.paul@codesourcery.com> In-Reply-To: <201006282129.34080.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 4/4] require #define NEED_GLOBAL_ENV for files that need the global register variable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org On 06/28/2010 10:29 PM, Paul Brook wrote: >> diff --git a/exec-all.h b/exec-all.h >> index a775582..ebe88ad 100644 >> --- a/exec-all.h >> +++ b/exec-all.h >> @@ -353,4 +353,8 @@ extern int singlestep; >> /* cpu-exec.c */ >> extern volatile sig_atomic_t exit_request; >> >> +#ifdef NEED_GLOBAL_ENV >> +register CPUState *env asm(AREG0); >> +#endif > > Wouldn't it be better to just put this in dyngen-exec.h ? > AFAICT there's a direct correlation between NEED_GLOBAL_ENV and #include > "exec.h". True, see cover letter in 0/4. I was told to make each file request explicitly the global variable though. So I'd have to leave the #ifdef even if I moved it into dyngen-exec.h. Paolo