diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-01-04 01:06:58 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-01-04 01:06:58 +0000 |
commit | 06c2f5066e298d456e4a6ca24def8a84cc9ed31a (patch) | |
tree | 387e2d20ee2fa0f19a72f5dec384acaa49e6d252 /target-i386/helper.c | |
parent | bdfaf503dc395cf77d6b67df5229c5c7a3cb7631 (diff) |
syscall insn fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1199 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r-- | target-i386/helper.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c index 3ae5b9113e..64d6f9e7ad 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -934,7 +934,7 @@ static void do_interrupt64(int intno, int is_int, int error_code, env->eflags &= ~(TF_MASK | VM_MASK | RF_MASK | NT_MASK); } -void helper_syscall(void) +void helper_syscall(int next_eip_addend) { int selector; @@ -943,7 +943,7 @@ void helper_syscall(void) } selector = (env->star >> 32) & 0xffff; if (env->hflags & HF_LMA_MASK) { - ECX = env->eip; + ECX = env->eip + next_eip_addend; env->regs[11] = compute_eflags(); cpu_x86_set_cpl(env, 0); @@ -963,7 +963,7 @@ void helper_syscall(void) else env->eip = env->cstar; } else { - ECX = (uint32_t)env->eip; + ECX = (uint32_t)(env->eip + next_eip_addend); cpu_x86_set_cpl(env, 0); cpu_x86_load_seg_cache(env, R_CS, selector & 0xfffc, @@ -1119,8 +1119,8 @@ void do_interrupt(int intno, int is_int, int error_code, fprintf(logfile, " EAX=" TARGET_FMT_lx, EAX); } fprintf(logfile, "\n"); - cpu_dump_state(env, logfile, fprintf, X86_DUMP_CCOP); #if 0 + cpu_dump_state(env, logfile, fprintf, X86_DUMP_CCOP); { int i; uint8_t *ptr; |