aboutsummaryrefslogtreecommitdiff
path: root/target/mips/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'target/mips/internal.h')
-rw-r--r--target/mips/internal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/mips/internal.h b/target/mips/internal.h
index 57072a9..04f4b3d 100644
--- a/target/mips/internal.h
+++ b/target/mips/internal.h
@@ -219,6 +219,16 @@ bool mips_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
/* op_helper.c */
void update_pagemask(CPUMIPSState *env, target_ulong arg1, int32_t *pagemask);
+static inline void mips_env_set_pc(CPUMIPSState *env, target_ulong value)
+{
+ env->active_tc.PC = value & ~(target_ulong)1;
+ if (value & 1) {
+ env->hflags |= MIPS_HFLAG_M16;
+ } else {
+ env->hflags &= ~(MIPS_HFLAG_M16);
+ }
+}
+
static inline void restore_pamask(CPUMIPSState *env)
{
if (env->hflags & MIPS_HFLAG_ELPA) {