aboutsummaryrefslogtreecommitdiff
path: root/target/ppc
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2021-07-06 15:13:21 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2021-07-09 10:38:19 +1000
commitcaf590ddc9f514f88cc409319c06550f1f2b4014 (patch)
tree2f87ba0a60af25c9afbb4b5f5589ee8966c0ac60 /target/ppc
parentfc8c745d50150a63f6c5ba2cd0b83b430963b7e8 (diff)
downloadqemu-caf590ddc9f514f88cc409319c06550f1f2b4014.zip
qemu-caf590ddc9f514f88cc409319c06550f1f2b4014.tar.gz
qemu-caf590ddc9f514f88cc409319c06550f1f2b4014.tar.bz2
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 <chzigotzky@xenosoft.de> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-Id: <20210706051321.609046-1-npiggin@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc')
-rw-r--r--target/ppc/translate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index f65d1e8..d1f482b 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)