diff mbox series

[6/7] target/hppa: mask privilege bits in mfia

Message ID 20240317221431.251515-7-svens@stackframe.org
State New
Headers show
Series few fixes for hppa target | expand

Commit Message

Sven Schnelle March 17, 2024, 10:14 p.m. UTC
mfia should return only the iaoq bits without privilege
bits.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
 target/hppa/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Helge Deller March 18, 2024, 8:45 p.m. UTC | #1
On 3/17/24 23:14, Sven Schnelle wrote:
> mfia should return only the iaoq bits without privilege
> bits.
>
> Signed-off-by: Sven Schnelle <svens@stackframe.org>

Reviewed-by: Helge Deller <deller@gmx.de>

Helge


> ---
>   target/hppa/translate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/hppa/translate.c b/target/hppa/translate.c
> index a09112e4ae..e47f8f9f47 100644
> --- a/target/hppa/translate.c
> +++ b/target/hppa/translate.c
> @@ -1962,7 +1962,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);
Richard Henderson March 18, 2024, 9:32 p.m. UTC | #2
On 3/17/24 12:14, Sven Schnelle wrote:
> mfia should return only the iaoq bits without privilege
> bits.
> 
> Signed-off-by: Sven Schnelle <svens@stackframe.org>
> ---
>   target/hppa/translate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Fixes: 98a9cb792c8 ("target-hppa: Implement system and memory-management insns")
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index a09112e4ae..e47f8f9f47 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -1962,7 +1962,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);