On 19 January 2012 08:24, 陳韋任 <che...@iis.sinica.edu.tw> 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