[PATCH 04/11] target/hppa: Use only low 2 immediate bits for PROBEI

Richard Henderson posted 11 patches 1 year ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>
[PATCH 04/11] target/hppa: Use only low 2 immediate bits for PROBEI
Posted by Richard Henderson 1 year ago
During the conversion to decodetree, the 2-bit mask was lost.

Fixes: deee69a19fd ("target/hppa: Convert memory management insns")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 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 f3b17ba16d..bb1b65fef0 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -2297,7 +2297,7 @@ static bool trans_probe(DisasContext *ctx, arg_probe *a)
     form_gva(ctx, &addr, &ofs, a->b, 0, 0, 0, a->sp, 0, false);
 
     if (a->imm) {
-        level = tcg_constant_i32(a->ri);
+        level = tcg_constant_i32(a->ri & 3);
     } else {
         level = tcg_temp_new_i32();
         tcg_gen_extrl_i64_i32(level, load_gpr(ctx, a->ri));
-- 
2.34.1
Re: [PATCH 04/11] target/hppa: Use only low 2 immediate bits for PROBEI
Posted by Philippe Mathieu-Daudé 1 year ago
On 11/11/23 02:32, Richard Henderson wrote:
> During the conversion to decodetree, the 2-bit mask was lost.
> 
> Fixes: deee69a19fd ("target/hppa: Convert memory management insns")
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/hppa/translate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>