Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
first shot at getting FPIP working, need to remove all FP control ins…
…tructions from being updated
  • Loading branch information
mothran committed Aug 28, 2015
1 parent adec227 commit 59b09a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion qemu/target-i386/fpu_helper.c
Expand Up @@ -991,7 +991,7 @@ void helper_fstenv(CPUX86State *env, target_ulong ptr, int data32)
cpu_stl_data(env, ptr, env->fpuc);
cpu_stl_data(env, ptr + 4, fpus);
cpu_stl_data(env, ptr + 8, fptag);
cpu_stl_data(env, ptr + 12, 0); /* fpip */
cpu_stl_data(env, ptr + 12, env->fpip); /* fpip */
cpu_stl_data(env, ptr + 16, 0); /* fpcs */
cpu_stl_data(env, ptr + 20, 0); /* fpoo */
cpu_stl_data(env, ptr + 24, 0); /* fpos */
Expand Down
6 changes: 6 additions & 0 deletions qemu/target-i386/translate.c
Expand Up @@ -248,6 +248,11 @@ static void gen_update_cc_op(DisasContext *s)
}
}

static void fpu_update_ip(CPUX86State *env)
{
env->fpip = env->eip;
}

#ifdef TARGET_X86_64

#define NB_OP_SIZES 4
Expand Down Expand Up @@ -6065,6 +6070,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
gen_exception(s, EXCP07_PREX, pc_start - s->cs_base);
break;
}
fpu_update_ip(env);
modrm = cpu_ldub_code(env, s->pc++);
mod = (modrm >> 6) & 3;
rm = modrm & 7;
Expand Down

0 comments on commit 59b09a7

Please sign in to comment.