@@ -3,6 +3,7 @@
struct TCGI386ModuleOps {
void (*update_fp_status)(CPUX86State *env);
+ void (*update_mxcsr_status)(CPUX86State *env);
};
extern struct TCGI386ModuleOps tcg_i386;
@@ -2128,14 +2128,13 @@ static inline bool cpu_vmx_maybe_enabled(CPUX86State *env)
int get_pg_mode(CPUX86State *env);
/* fpu_helper.c */
-void update_mxcsr_status(CPUX86State *env);
void update_mxcsr_from_sse_status(CPUX86State *env);
static inline void cpu_set_mxcsr(CPUX86State *env, uint32_t mxcsr)
{
env->mxcsr = mxcsr;
if (tcg_enabled()) {
- update_mxcsr_status(env);
+ tcg_i386.update_mxcsr_status(env);
}
}
@@ -7,4 +7,5 @@ static void i386_update_cpu_stub(CPUX86State *cpu)
struct TCGI386ModuleOps tcg_i386 = {
.update_fp_status = i386_update_cpu_stub,
+ .update_mxcsr_status = i386_update_cpu_stub,
};
@@ -372,7 +372,7 @@ static int cpu_post_load(void *opaque, int version_id)
if (tcg_enabled()) {
target_ulong dr7;
tcg_i386.update_fp_status(env);
- update_mxcsr_status(env);
+ tcg_i386.update_mxcsr_status(env);
cpu_breakpoint_remove_all(cs, BP_CPU);
cpu_watchpoint_remove_all(cs, BP_CPU);
@@ -2947,7 +2947,7 @@ void helper_xsetbv(CPUX86State *env, uint32_t ecx, uint64_t mask)
#define SSE_RC_CHOP 0x6000
#define SSE_FZ 0x8000
-void update_mxcsr_status(CPUX86State *env)
+static void update_mxcsr_status(CPUX86State *env)
{
uint32_t mxcsr = env->mxcsr;
int rnd_type;
@@ -3043,6 +3043,7 @@ void helper_movq(CPUX86State *env, void *d, void *s)
static void tcgi386_module_ops_fpu(void)
{
tcg_i386.update_fp_status = update_fp_status;
+ tcg_i386.update_mxcsr_status = update_mxcsr_status;
}
type_init(tcgi386_module_ops_fpu);
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- include/tcg/tcg-module-i386.h | 1 + target/i386/cpu.h | 3 +-- accel/tcg/tcg-module-i386.c | 1 + target/i386/machine.c | 2 +- target/i386/tcg/fpu_helper.c | 3 ++- 5 files changed, 6 insertions(+), 4 deletions(-)