target/hppa: mask privilege bits in mfia
authorSven Schnelle <svens@stackframe.org>
Tue, 19 Mar 2024 16:19:20 +0000 (17:19 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 20 Mar 2024 00:08:02 +0000 (14:08 -1000)
mfia should return only the iaoq bits without privilege
bits.

Fixes: 98a9cb792c8 ("target-hppa: Implement system and memory-management insns")
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Helge Deller <deller@gmx.de>
Message-Id: <20240319161921.487080-6-svens@stackframe.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/hppa/translate.c

index 107d7f1a85e4981fa6e61c195d5fe7e135eef751..19594f917ee3920edd0452e997e9f0f0029d3235 100644 (file)
@@ -2011,7 +2011,7 @@ static bool trans_mfia(DisasContext *ctx, arg_mfia *a)
 {
     unsigned rt = a->t;
     TCGv_i64 tmp = dest_gpr(ctx, rt);
-    tcg_gen_movi_i64(tmp, ctx->iaoq_f);
+    tcg_gen_movi_i64(tmp, ctx->iaoq_f & ~3ULL);
     save_gpr(ctx, rt, tmp);
 
     cond_free(&ctx->null_cond);