summaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-30 17:22:15 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-30 17:22:15 +0000
commit6e68e076e72f42d43cc3b5435751d796c2410a3f (patch)
tree75146f8907674df3e5d8bbb8a579940d9b73b677 /target-i386
parenta4a99d71b29ef6e506feeabc119e8ddf8490b07b (diff)
downloadqemu-6e68e076e72f42d43cc3b5435751d796c2410a3f.tar.gz
Move clone() register setup to target specific code. Handle fork-like clone.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4623 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/cpu.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index eb0052786c..7d4551e765 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -734,6 +734,15 @@ typedef struct CCTable {
extern CCTable cc_table[];
+#if defined(CONFIG_USER_ONLY)
+static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
+{
+ if (!newsp)
+ env->regs[R_ESP] = newsp;
+ env->regs[R_EAX] = 0;
+}
+#endif
+
#include "cpu-all.h"
#include "svm.h"