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, do_interrupt(env); 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). Why we need to assign envl to env here? Is it redundant, or I miss something? 2) 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? Thanks. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj