about summary refs log tree commit diff
path: root/ports/sysdeps
diff options
context:
space:
mode:
authorMarcus Shawcroft <marcus.shawcroft@linaro.org>2013-06-04 10:05:08 +0100
committerMarcus Shawcroft <marcus.shawcroft@linaro.org>2013-06-04 10:13:59 +0100
commit6e445a3d2bdf152ebf57d1c92bfea1828e070743 (patch)
tree851ba22f1e4ffddff7dce72da9aff992d24d8b47 /ports/sysdeps
parentd180203e97cbe53e0117c9405d68f51e80dafd95 (diff)
downloadglibc-6e445a3d2bdf152ebf57d1c92bfea1828e070743.tar.gz
glibc-6e445a3d2bdf152ebf57d1c92bfea1828e070743.tar.xz
glibc-6e445a3d2bdf152ebf57d1c92bfea1828e070743.zip
[AArch64] Ensure getcontext() initializes PSTATE.
Diffstat (limited to 'ports/sysdeps')
-rw-r--r--ports/sysdeps/unix/sysv/linux/aarch64/getcontext.S4
-rw-r--r--ports/sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym1
2 files changed, 5 insertions, 0 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/getcontext.S b/ports/sysdeps/unix/sysv/linux/aarch64/getcontext.S
index eea6867f9b..c3709575bc 100644
--- a/ports/sysdeps/unix/sysv/linux/aarch64/getcontext.S
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/getcontext.S
@@ -53,6 +53,10 @@ ENTRY(__getcontext)
 	mov	x2, sp
 	str     x2, [x0, oSP]
 
+	/* Initialize the pstate.  */
+	mov	x3, #0
+	str	x3, [x0, oPSTATE]
+
 	/* Figure out where to place the first context extension
 	   block.  */
 	add     x2, x0, #oEXTENSION
diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym b/ports/sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym
index 1afff78687..ab3930c173 100644
--- a/ports/sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym
@@ -37,6 +37,7 @@ STACK_FLAGS			stack (ss_flags)
 oX0				mcontext (regs)
 oSP				mcontext (sp)
 oPC				mcontext (pc)
+oPSTATE				mcontext (pstate)
 oEXTENSION                      mcontext (__reserved)
 
 #define fpsimd_context(member)  offsetof (struct fpsimd_context, member)