aboutsummaryrefslogtreecommitdiff
path: root/target-sh4/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'target-sh4/cpu.h')
-rw-r--r--target-sh4/cpu.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/target-sh4/cpu.h b/target-sh4/cpu.h
index c03cdb188c..9294b94e3f 100644
--- a/target-sh4/cpu.h
+++ b/target-sh4/cpu.h
@@ -143,6 +143,15 @@ static inline int cpu_mmu_index (CPUState *env)
return (env->sr & SR_MD) == 0 ? 1 : 0;
}
+#if defined(CONFIG_USER_ONLY)
+static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
+{
+ if (!newsp)
+ env->gregs[15] = newsp;
+ env->gregs[0] = 0;
+}
+#endif
+
#include "cpu-all.h"
/* Memory access type */