target-arm: A64: Respect SPSEL in ERET SP restore
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Mon, 4 Aug 2014 13:41:54 +0000 (14:41 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 4 Aug 2014 13:41:54 +0000 (14:41 +0100)
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Greg Bellows <greg.bellows@linaro.org>
Message-id: 1402994746-8328-3-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/op_helper.c

index 90a946a0fd0d7decc4b75b98710d7023e928946c..25ad902e04416e0b79825919b16a4a05f3998524 100644 (file)
@@ -410,7 +410,7 @@ void HELPER(exception_return)(CPUARMState *env)
         }
         env->aarch64 = 1;
         pstate_write(env, spsr);
-        env->xregs[31] = env->sp_el[new_el];
+        aarch64_restore_sp(env, new_el);
         env->pc = env->elr_el[cur_el];
     }