diff options
Diffstat (limited to 'target-m68k/cpu.h')
-rw-r--r-- | target-m68k/cpu.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target-m68k/cpu.h b/target-m68k/cpu.h index 48c752c83f..bdef9b8378 100644 --- a/target-m68k/cpu.h +++ b/target-m68k/cpu.h @@ -239,4 +239,14 @@ static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb) env->pc = tb->pc; } +static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc, + target_ulong *cs_base, int *flags) +{ + *pc = env->pc; + *cs_base = 0; + *flags = (env->fpcr & M68K_FPCR_PREC) /* Bit 6 */ + | (env->sr & SR_S) /* Bit 13 */ + | ((env->macsr >> 4) & 0xf); /* Bits 0-3 */ +} + #endif |