Re: [Qemu-devel] Question about do_interrupt (target-i386/op_helper.c)

2012-01-20 Thread 陳韋任
> 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. Do you mean we sync env with envl at this point? Regards, chenwj -- Wei-Ren Chen (陳韋任)

Re: [Qemu-devel] Question about do_interrupt (target-i386/op_helper.c)

2012-01-19 Thread Peter Maydell
On 19 January 2012 08:24, 陳韋任 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 (hel

[Qemu-devel] Question about do_interrupt (target-i386/op_helper.c)

2012-01-19 Thread 陳韋任
Hi all, I am looking at do_interrupt (target-i386/op_helper.c) and find something strange. Code sinpt below, void do_interrupt(CPUState *env1) { CPUState *saved_env; saved_env = env; env = env1; ... } In i386-linux-user, cpu_exec (cpu-exec.c) calls do_interrupt like this,