[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/14] target/i386: Simplify get_memio_eip()
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
[PATCH 01/14] target/i386: Simplify get_memio_eip() |
|
Date: |
Sat, 27 Apr 2024 17:57:01 +0200 |
The single call to get_memio_eip(), in cpu_report_tpr_access(),
is protected by a check on tcg_enabled(). Since the call only
exists when CONFIG_TCG is defined, we can slightly simplify.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/i386/helper.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/target/i386/helper.c b/target/i386/helper.c
index 23ccb23a5b..a3e70a630a 100644
--- a/target/i386/helper.c
+++ b/target/i386/helper.c
@@ -512,9 +512,9 @@ void cpu_x86_inject_mce(Monitor *mon, X86CPU *cpu, int bank,
}
}
+#ifdef CONFIG_TCG
static inline target_ulong get_memio_eip(CPUX86State *env)
{
-#ifdef CONFIG_TCG
uint64_t data[TARGET_INSN_START_WORDS];
CPUState *cs = env_cpu(env);
@@ -528,10 +528,8 @@ static inline target_ulong get_memio_eip(CPUX86State *env)
} else {
return data[0] - env->segs[R_CS].base;
}
-#else
- qemu_build_not_reached();
-#endif
}
+#endif
void cpu_report_tpr_access(CPUX86State *env, TPRAccess access)
{
--
2.41.0
- [PATCH 00/14] exec: Rework around CPUState user fields, Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 01/14] target/i386: Simplify get_memio_eip(),
Philippe Mathieu-Daudé <=
- [PATCH 02/14] plugins: Update stale comment, Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 04/14] exec: Include missing license in 'exec/cpu-common.h', Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 03/14] plugins/api: Only include 'exec/ram_addr.h' with system emulation, Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 05/14] exec/cpu: Indent TARGET_PAGE_foo definitions, Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 06/14] exec/cpu: Remove obsolete PAGE_RESERVED definition, Philippe Mathieu-Daudé, 2024/04/27