[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 23/29] tcg_i386_funcs: Add update_mxcsr_status to TCGI386ModuleOp
From: |
Gerd Hoffmann |
Subject: |
[PATCH 23/29] tcg_i386_funcs: Add update_mxcsr_status to TCGI386ModuleOps |
Date: |
Tue, 31 Aug 2021 14:15:39 +0200 |
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(-)
diff --git a/include/tcg/tcg-module-i386.h b/include/tcg/tcg-module-i386.h
index 3854b506d5dc..5d8f6434e32d 100644
--- a/include/tcg/tcg-module-i386.h
+++ b/include/tcg/tcg-module-i386.h
@@ -3,6 +3,7 @@
struct TCGI386ModuleOps {
void (*update_fp_status)(CPUX86State *env);
+ void (*update_mxcsr_status)(CPUX86State *env);
};
extern struct TCGI386ModuleOps tcg_i386;
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 5769c1292683..bdfdbdb0d8a8 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -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);
}
}
diff --git a/accel/tcg/tcg-module-i386.c b/accel/tcg/tcg-module-i386.c
index 41ce2ba4eb76..fa455a2e02cb 100644
--- a/accel/tcg/tcg-module-i386.c
+++ b/accel/tcg/tcg-module-i386.c
@@ -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,
};
diff --git a/target/i386/machine.c b/target/i386/machine.c
index 7f5d80766f28..dc63de37dd6f 100644
--- a/target/i386/machine.c
+++ b/target/i386/machine.c
@@ -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);
diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c
index 0f7206e834fd..12dd6c9a65df 100644
--- a/target/i386/tcg/fpu_helper.c
+++ b/target/i386/tcg/fpu_helper.c
@@ -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);
--
2.31.1
- [PATCH 14/29] tcg_funcs:Add tcg_exec_{realizefn, unrealizefn} to TCGModuleOps, (continued)
- [PATCH 14/29] tcg_funcs:Add tcg_exec_{realizefn, unrealizefn} to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 13/29] tcg_funcs: Add tlb_plugin_lookup to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 15/29] tcg_funcs: Add tb_flush to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 17/29] tcg: drop tb_invalidate_phys_page_range(), Gerd Hoffmann, 2021/08/31
- [PATCH 16/29] tcg: use tb_page_addr_t for tb_invalidate_phys_range(), Gerd Hoffmann, 2021/08/31
- [PATCH 18/29] tcg_funcs: Add tb_invalidate_phys_range to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 19/29] tcg_funcs: Add tb_check_watchpoint to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 21/29] tcg_funcs: Add curr_cflags to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 20/29] tcg_funcs: Add cpu_restore_state to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 23/29] tcg_i386_funcs: Add update_mxcsr_status to TCGI386ModuleOps,
Gerd Hoffmann <=
- [PATCH 22/29] tcg_i386_funcs: Add update_fp_status to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 24/29] tcg_i386_funcs: Add update_mxcsr_from_sse_status to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 26/29] tcg_i386_funcs: Add cpu_set_ignne to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 25/29] tcg_i386_funcs: Add x86_register_ferr_irq to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 28/29] tcg_i386_funcs: Add cpu_cc_compute_all to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 27/29] tcg_i386_funcs: Add cpu_x86_update_dr7 to TCGI386ModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 29/29] Revert "build: temporarily disable modular tcg", Gerd Hoffmann, 2021/08/31