[AArch64] Ensure getcontext() initializes PSTATE.
authorMarcus Shawcroft <marcus.shawcroft@linaro.org>
Tue, 4 Jun 2013 09:05:08 +0000 (10:05 +0100)
committerMarcus Shawcroft <marcus.shawcroft@linaro.org>
Tue, 4 Jun 2013 09:13:59 +0000 (10:13 +0100)
ports/ChangeLog.aarch64
ports/sysdeps/unix/sysv/linux/aarch64/getcontext.S
ports/sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym

index 46def45f6198a30c5666ee7f2a8d136490dba06d..382ecdbdc47d1a08a8b6b7a219a25cc4cb39c2a0 100644 (file)
@@ -1,3 +1,9 @@
+2013-06-04  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
+
+       * sysdeps/unix/sysv/linux/aarch64/getcontext.S (__getcontext):
+       Initialize pstate.
+       * sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym (oPSTATE): Define.
+
 2013-05-29  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
        [BZ #15465]
index eea6867f9b5c06b9c6eba836934cf637216d2e6c..c3709575bc1e6ddf8574090beeaaed889fb7c80f 100644 (file)
@@ -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
index 1afff78687910671de579bb1337c84036cd8a358..ab3930c173c87c620447d1578f21322ea9fc11b8 100644 (file)
@@ -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)