about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/sh/makecontext.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/sh/makecontext.S b/sysdeps/unix/sysv/linux/sh/makecontext.S
index a04bc9f635..73fca8bf57 100644
--- a/sysdeps/unix/sysv/linux/sh/makecontext.S
+++ b/sysdeps/unix/sysv/linux/sh/makecontext.S
@@ -128,6 +128,7 @@ ENTRY(__makecontext)
 	cfi_restore (pr)
 	/* If this returns (which can happen if the syscall fails) we'll exit
 	   the program with the return error value (-1).  */
+	mov	r0, r4
 
 2:
 	mov.l	.Lexit, r1
@@ -135,7 +136,7 @@ ENTRY(__makecontext)
 	add	r12, r1
 #endif
 	jsr	@r1
-	 mov	r0, r4
+	 nop
 	/* The 'exit' call should never return.  In case it does cause the
 	   process to terminate.  */
 	ABORT_INSTRUCTION_ASM