target/arm: Don't calculate lr in arm_v7m_cpu_do_interrupt() until needed
commitbd70b29ba92e4446f9e4eb8b9acc19ef6ff4a4d5
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 4 Sep 2017 14:21:53 +0000 (4 15:21 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 4 Sep 2017 14:21:53 +0000 (4 15:21 +0100)
treecdeb2593877cc17e17a30b7e367e20b1bd62b2a9
parent5b906f3589443a3c69d8feeaac37263843ecfb8d
target/arm: Don't calculate lr in arm_v7m_cpu_do_interrupt() until needed

Move the code in arm_v7m_cpu_do_interrupt() that calculates the
magic LR value down to when we're actually going to use it.
Having the calculation and use so far apart makes the code
a little harder to understand than it needs to be.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 1501692241-23310-13-git-send-email-peter.maydell@linaro.org
target/arm/helper.c