about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S')
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S b/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S
index bda313cb23..683f8bb985 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S
@@ -71,6 +71,12 @@ ENTRY(__getcontext)
 	/* Store general purpose registers.  */
 	stmg    %r0,%r15,SC_GPRS(%r1)
 
+	/* Store psw mask to 0x0 and addr to return address.  Then the address
+	   can be retrieved from the ucontext structure in the same way as if it
+	   is created by kernel and passed to a signal-handler.  */
+	stg	%r2,SC_PSW+0(%r1)
+	stg	%r14,SC_PSW+8(%r1)
+
 	/* Return.  */
 	br	%r14
 END(__getcontext)