OSDN Git Service

target/hppa: Decode ADDB double-word
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 17 Sep 2023 05:25:30 +0000 (22:25 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 7 Nov 2023 02:49:34 +0000 (18:49 -0800)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/hppa/translate.c

index 7f767fe..1b4fa40 100644 (file)
@@ -3143,6 +3143,17 @@ static bool do_addb(DisasContext *ctx, unsigned r, TCGv_reg in1,
     DisasCond cond;
     bool d = false;
 
+    /*
+     * For hppa64, the ADDB conditions change with PSW.W,
+     * dropping ZNV, SV, OD in favor of double-word EQ, LT, LE.
+     */
+    if (ctx->tb_flags & PSW_W) {
+        d = c >= 5;
+        if (d) {
+            c &= 3;
+        }
+    }
+
     in2 = load_gpr(ctx, r);
     dest = tcg_temp_new();
     sv = NULL;