[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Question about do_interrupt (target-i386/op_helper.c)
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] Question about do_interrupt (target-i386/op_helper.c) |
Date: |
Thu, 19 Jan 2012 18:33:33 +0000 |
On 19 January 2012 08:24, 陳韋任 <address@hidden> wrote:
> My questions are: 1) It seems to me the parameter of do_interrupt (envl)
> should
> be the same as env inside do_interrupt (which comes from dyngen-exec.h's
> #define).
In cpu_exec() env is a local variable. In do_interrupt() it is the global
variable (held in a specific register via "asm(AREG0)"). The two aren't
necessarily the same value, hence the fiddling about.
> In target-i386/op_helper.c, some functions use the global env, while others
> use
> function parameter env. Is it necessary? Or we can unify how they use env?
There have been some recent patch series attempting to reduce the use of
global env, but it's not a trivial changeover.
-- PMM