From: Nicholas Piggin Date: Tue, 6 Jul 2021 05:13:21 +0000 (+1000) Subject: target/ppc: mtmsrd is an illegal instruction on BookE X-Git-Tag: v6.1.0-rc0~33^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=caf590ddc9f514f88cc409319c06550f1f2b4014;p=thirdparty%2Fqemu.git target/ppc: mtmsrd is an illegal instruction on BookE MSR is a 32-bit register in BookE and there is no mtmsrd instruction. Cc: Christian Zigotzky Signed-off-by: Nicholas Piggin Message-Id: <20210706051321.609046-1-npiggin@gmail.com> Signed-off-by: David Gibson --- diff --git a/target/ppc/translate.c b/target/ppc/translate.c index f65d1e81eac..d1f482b0f36 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -4940,6 +4940,11 @@ static void gen_mtcrf(DisasContext *ctx) #if defined(TARGET_PPC64) static void gen_mtmsrd(DisasContext *ctx) { + if (unlikely(!is_book3s_arch2x(ctx))) { + gen_invalid(ctx); + return; + } + CHK_SV; #if !defined(CONFIG_USER_ONLY)