aboutsummaryrefslogtreecommitdiff
path: root/target/hppa
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2023-10-26 21:49:48 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-11-06 18:49:34 -0800
commit4c34bab0d3dc59fef4ebce831fbca784a1e3e06a (patch)
tree71f292fde43e1982faa5f103c782035cc6da29b0 /target/hppa
parent34a0d9eefe7dd6161c100e6ffaf25c6c6f4a7282 (diff)
downloadqemu-4c34bab0d3dc59fef4ebce831fbca784a1e3e06a.zip
qemu-4c34bab0d3dc59fef4ebce831fbca784a1e3e06a.tar.gz
qemu-4c34bab0d3dc59fef4ebce831fbca784a1e3e06a.tar.bz2
target/hppa: Clear upper bits in mtctl for pa1.x
Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hppa')
-rw-r--r--target/hppa/translate.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 9f129a2..4102f5f 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -2060,7 +2060,13 @@ static bool trans_mtctl(DisasContext *ctx, arg_mtctl *a)
#ifndef CONFIG_USER_ONLY
nullify_over(ctx);
- reg = load_gpr(ctx, a->r);
+
+ if (ctx->is_pa20) {
+ reg = load_gpr(ctx, a->r);
+ } else {
+ reg = tcg_temp_new_i64();
+ tcg_gen_ext32u_i64(reg, load_gpr(ctx, a->r));
+ }
switch (ctl) {
case CR_IT: