target/m68k: Perform writback before modifying SR
commit214c6002d0263bce2225e23983e58d36740a6e1d
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 13 Sep 2022 14:28:18 +0000 (13 15:28 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Wed, 21 Sep 2022 13:02:28 +0000 (21 15:02 +0200)
tree30ea6c3b1331d14a720628064ee574169d5c8907
parent24ec52f91dfb6d26d7035093adca60d18f02074e
target/m68k: Perform writback before modifying SR

Writes to SR may change security state, which may involve
a swap of %ssp with %usp as reflected in %a7.  Finish the
writeback of %sp@+ before swapping stack pointers.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1206
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220913142818.7802-3-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
target/m68k/translate.c