qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: 陳韋任
Subject: [Qemu-devel] Question about do_interrupt (target-i386/op_helper.c)
Date: Thu, 19 Jan 2012 16:24:30 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]