OSDN Git Service

target/arm: Initialize exc_secure correctly in do_v7m_exception_exit()
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 14 Aug 2018 16:17:21 +0000 (17:17 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 14 Aug 2018 16:17:21 +0000 (17:17 +0100)
commitb8109608bc6f3337298d44ac4369bf0bc8c3a1e4
tree26564f74554469d4910cdc15ca407110764236c8
parenta9074977ef59db36f8755c79d3de97ef8f036913
target/arm: Initialize exc_secure correctly in do_v7m_exception_exit()

In do_v7m_exception_exit(), we use the exc_secure variable to track
whether the exception we're returning from is secure or non-secure.
Unfortunately the statement initializing this was accidentally
inside an "if (env->v7m.exception != ARMV7M_EXCP_NMI)" conditional,
which meant that we were using the wrong value for NMI handlers.
Move the initialization out to the right place.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180720145647.8810-3-peter.maydell@linaro.org
target/arm/helper.c