summaryrefslogtreecommitdiff
path: root/target-sparc/cpu.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-18 19:36:03 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-18 19:36:03 +0000
commitc4c4761fed30f8cc013a768c6eca95c3d5292bd5 (patch)
treefee9d5e6565753bc31943e70067d1b5d9e771029 /target-sparc/cpu.h
parent0a95b742f083ebd6011c72a8cf699288709bbf04 (diff)
downloadqemu-c4c4761fed30f8cc013a768c6eca95c3d5292bd5.tar.gz
qemu-c4c4761fed30f8cc013a768c6eca95c3d5292bd5.tar.bz2
qemu-c4c4761fed30f8cc013a768c6eca95c3d5292bd5.zip
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-sparc/cpu.h')
-rw-r--r--target-sparc/cpu.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index c13926d16a..4779e3474e 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -491,12 +491,8 @@ static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
}
#endif
-#define CPU_PC_FROM_TB(env, tb) do { \
- env->pc = tb->pc; \
- env->npc = tb->cs_base; \
- } while(0)
-
#include "cpu-all.h"
+#include "exec-all.h"
/* sum4m.c, sun4u.c */
void cpu_check_irqs(CPUSPARCState *env);
@@ -508,4 +504,10 @@ uint64_t cpu_tick_get_count(void *opaque);
void cpu_tick_set_limit(void *opaque, uint64_t limit);
#endif
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
+{
+ env->pc = tb->pc;
+ env->npc = tb->cs_base;
+}
+
#endif