summaryrefslogtreecommitdiff
path: root/target-arm
diff options
context:
space:
mode:
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/cpu.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 1042808665..1c51d2df40 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -408,6 +408,15 @@ static inline int cpu_mmu_index (CPUState *env)
return (env->uncached_cpsr & CPSR_M) == ARM_CPU_MODE_USR ? 1 : 0;
}
+#if defined(CONFIG_USER_ONLY)
+static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
+{
+ if (!newsp)
+ env->regs[13] = newsp;
+ env->regs[0] = 0;
+}
+#endif
+
#include "cpu-all.h"
#endif