target/arm: Factor out 'generate singlestep exception' function
commitc1d5f50f094ab204accfacc2ee6aafc9601dd5c4
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 15 Aug 2019 08:46:42 +0000 (15 09:46 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 16 Aug 2019 13:02:48 +0000 (16 14:02 +0100)
treea0e486e6ffc22dc2b2f2b749b26997db416f7cf4
parent88e1b59ee30950a66ea28b740914bf603fa9a1ec
target/arm: Factor out 'generate singlestep exception' function

Factor out code to 'generate a singlestep exception', which is
currently repeated in four places.

To do this we need to also pull the identical copies of the
gen-exception() function out of translate-a64.c and translate.c
into translate.h.

(There is a bug in the code: we're taking the exception to the wrong
target EL.  This will be simpler to fix if there's only one place to
do it.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20190805130952.4415-2-peter.maydell@linaro.org
target/arm/translate-a64.c
target/arm/translate.c
target/arm/translate.h