All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: blauwirbel@gmail.com, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] Re: [PATCH 4/4] require #define NEED_GLOBAL_ENV for files that need the global register variable
Date: Tue, 29 Jun 2010 12:30:16 +0100	[thread overview]
Message-ID: <201006291230.18759.paul@codesourcery.com> (raw)
In-Reply-To: <4C29A478.1080805@redhat.com>

> 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.

I don't understand what this is supposed to achieve.
The inclusion of exec.h is what defines whether this global variable is 
available.  Just as importantly, it also prevents code clobbering this value.  
Having one without the other makes no sense.

Making "env" available without including exec.h would be a different problem, 
but we never do that and would probably indicate we're doing something else 
wrong.

Paul

  reply	other threads:[~2010-06-29 11:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-28 17:17 [Qemu-devel] [PATCH 0/4] introduce NEED_GLOBAL_ENV Paolo Bonzini
2010-06-28 17:17 ` [Qemu-devel] [PATCH 1/4] remove unused stuff from */exec.h Paolo Bonzini
2010-06-28 17:43   ` [Qemu-devel] " Blue Swirl
2010-06-29  7:48     ` Paolo Bonzini
2010-06-28 17:17 ` [Qemu-devel] [PATCH 2/4] move cpu_pc_from_tb to target-*/exec.h Paolo Bonzini
2010-06-28 17:17 ` [Qemu-devel] [PATCH 3/4] remove exec-all.h inclusion from cpu.h Paolo Bonzini
2010-06-28 17:17 ` [Qemu-devel] [PATCH 4/4] require #define NEED_GLOBAL_ENV for files that need the global register variable Paolo Bonzini
2010-06-28 20:29   ` Paul Brook
2010-06-29  7:44     ` [Qemu-devel] " Paolo Bonzini
2010-06-29 11:30       ` Paul Brook [this message]
2010-06-29 13:51         ` Paolo Bonzini
2010-06-29 14:24           ` Paolo Bonzini
2010-06-29 15:28             ` Paul Brook
2010-06-29 15:40               ` Paolo Bonzini
2010-06-30  0:34                 ` Paul Brook
2010-06-29 18:22       ` Blue Swirl
2010-06-28 17:54 ` [Qemu-devel] Re: [PATCH 0/4] introduce NEED_GLOBAL_ENV Blue Swirl
     [not found] <5692464.1280361277887491249.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>
2010-06-30  8:56 ` [Qemu-devel] Re: [PATCH 4/4] require #define NEED_GLOBAL_ENV for files that need the global register variable Paolo Bonzini
2010-07-01 19:42   ` Blue Swirl
2010-07-02  9:50     ` Paolo Bonzini
2010-07-03  7:23       ` Blue Swirl
2010-07-08 16:39         ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201006291230.18759.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=blauwirbel@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.