提交 93eac243 编写于 作者: B bellard

32 bit syscall fix (Juergen Keil)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2189 c046a42c-6fe2-441c-8c8c-71466251a162
上级 a7e6f8ba
......@@ -470,9 +470,13 @@ static int do_syscall(CPUState *env,
selector = (env->star >> 32) & 0xffff;
#ifdef __x86_64__
if (env->hflags & HF_LMA_MASK) {
int code64;
env->regs[R_ECX] = kenv->next_eip;
env->regs[11] = env->eflags;
code64 = env->hflags & HF_CS64_MASK;
cpu_x86_set_cpl(env, 0);
cpu_x86_load_seg_cache(env, R_CS, selector & 0xfffc,
0, 0xffffffff,
......@@ -485,7 +489,7 @@ static int do_syscall(CPUState *env,
DESC_S_MASK |
DESC_W_MASK | DESC_A_MASK);
env->eflags &= ~env->fmask;
if (env->hflags & HF_CS64_MASK)
if (code64)
env->eip = env->lstar;
else
env->eip = env->cstar;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册