target-s390: Fix cpu_clone_regs
authorRichard Henderson <rth@twiddle.net>
Wed, 12 Sep 2012 23:52:31 +0000 (16:52 -0700)
committerRichard Henderson <rth@twiddle.net>
Sat, 5 Jan 2013 20:18:45 +0000 (12:18 -0800)
R2 is the syscall return register, not R0.

Signed-off-by: Richard Henderson <rth@twiddle.net>
target-s390x/cpu.h

index dc7bbc6..bc3fab2 100644 (file)
@@ -116,7 +116,7 @@ static inline void cpu_clone_regs(CPUS390XState *env, target_ulong newsp)
     if (newsp) {
         env->regs[15] = newsp;
     }
-    env->regs[0] = 0;
+    env->regs[2] = 0;
 }
 #endif