qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/ppc: mtmsrd is an illegal instruction on BookE
@ 2021-07-06  5:13 Nicholas Piggin
  2021-07-08  2:44 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Piggin @ 2021-07-06  5:13 UTC (permalink / raw)
  To: qemu-ppc; +Cc: Christian Zigotzky, qemu-devel, Nicholas Piggin, David Gibson

MSR is a 32-bit register in BookE and there is no mtmsrd instruction.

Cc: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 target/ppc/translate.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index f65d1e81ea..d1f482b0f3 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)
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-08  4:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-06  5:13 [PATCH] target/ppc: mtmsrd is an illegal instruction on BookE Nicholas Piggin
2021-07-08  2:44 ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).