diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-18 19:36:03 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-18 19:36:03 +0000 |
commit | 622ed3605bf4caa5d52b407081ceb6ecce752aec (patch) | |
tree | fee9d5e6565753bc31943e70067d1b5d9e771029 /target-mips | |
parent | 62d60e8cc4c4c8aebdfd97f10087456d2690c0a0 (diff) |
Convert CPU_PC_FROM_TB to static inline (Jan Kiszka)
as macros should be avoided when possible.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5735 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips')
-rw-r--r-- | target-mips/cpu.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/target-mips/cpu.h b/target-mips/cpu.h index d686f8e255..a2544b180f 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -502,6 +502,7 @@ static inline void cpu_clone_regs(CPUState *env, target_ulong newsp) } #include "cpu-all.h" +#include "exec-all.h" /* Memory access type : * may be needed for precise access rights control and precise exceptions. @@ -563,10 +564,11 @@ CPUMIPSState *cpu_mips_init(const char *cpu_model); uint32_t cpu_mips_get_clock (void); int cpu_mips_signal_handler(int host_signum, void *pinfo, void *puc); -#define CPU_PC_FROM_TB(env, tb) do { \ - env->active_tc.PC = tb->pc; \ - env->hflags &= ~MIPS_HFLAG_BMASK; \ - env->hflags |= tb->flags & MIPS_HFLAG_BMASK; \ - } while (0) +static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb) +{ + env->active_tc.PC = tb->pc; + env->hflags &= ~MIPS_HFLAG_BMASK; + env->hflags |= tb->flags & MIPS_HFLAG_BMASK; +} #endif /* !defined (__MIPS_CPU_H__) */ |