mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
accel/tcg: Hoist cpu_get_tb_cpu_state decl to accl/tcg/cpu-ops.h
For some targets, simply remove the local definition. For other targets, move the inline definition out of line. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
c2d5897d3b
commit
a59a876999
37 changed files with 243 additions and 285 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "cpu.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "fpu/softfloat.h"
|
||||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static void m68k_cpu_set_pc(CPUState *cs, vaddr value)
|
||||
{
|
||||
|
@ -38,6 +39,22 @@ static vaddr m68k_cpu_get_pc(CPUState *cs)
|
|||
return cpu->env.pc;
|
||||
}
|
||||
|
||||
void cpu_get_tb_cpu_state(CPUM68KState *env, vaddr *pc,
|
||||
uint64_t *cs_base, uint32_t *flags)
|
||||
{
|
||||
*pc = env->pc;
|
||||
*cs_base = 0;
|
||||
*flags = (env->macsr >> 4) & TB_FLAGS_MACSR;
|
||||
if (env->sr & SR_S) {
|
||||
*flags |= TB_FLAGS_MSR_S;
|
||||
*flags |= (env->sfc << (TB_FLAGS_SFC_S_BIT - 2)) & TB_FLAGS_SFC_S;
|
||||
*flags |= (env->dfc << (TB_FLAGS_DFC_S_BIT - 2)) & TB_FLAGS_DFC_S;
|
||||
}
|
||||
if (M68K_SR_TRACE(env->sr) == M68K_SR_TRACE_ANY_INS) {
|
||||
*flags |= TB_FLAGS_TRACE;
|
||||
}
|
||||
}
|
||||
|
||||
static void m68k_restore_state_to_opc(CPUState *cs,
|
||||
const TranslationBlock *tb,
|
||||
const uint64_t *data)
|
||||
|
@ -586,8 +603,6 @@ static const struct SysemuCPUOps m68k_sysemu_ops = {
|
|||
};
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
|
||||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps m68k_tcg_ops = {
|
||||
/* MTTCG not yet supported: require strict ordering */
|
||||
.guest_default_memory_order = TCG_MO_ALL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue