]> Git Repo - qemu.git/commitdiff
target/hppa: fix dcor instruction
authorSven Schnelle <[email protected]>
Mon, 11 Feb 2019 18:19:07 +0000 (19:19 +0100)
committerRichard Henderson <[email protected]>
Tue, 12 Feb 2019 16:59:21 +0000 (08:59 -0800)
It looks like the operands where exchanged. HP bootrom tests the
following sequence:

0x00000000f0004064:  ldil L%-66666800,r7
0x00000000f0004068:  addi 19f,r7,r7
0x00000000f000406c:  addi -1,r0,rp
0x00000000f0004070:  addi f,r0,r4
0x00000000f0004074:  addi 1,r4,r5
0x00000000f0004078:  dcor rp,r6
0x00000000f000407c:  cmpb,<>,n r6,r7,0xf000411

This returned 0x66666661 instead of the expected 0x9999999f in QEMU.

Signed-off-by: Sven Schnelle <[email protected]>
Message-Id: <20190211181907[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
target/hppa/translate.c

index 026ba5cb3e9b5dc519eff2ebfdd162028d2e3166..b4fd307b7702b5f343e84d74801ada21315e3962 100644 (file)
@@ -2744,7 +2744,7 @@ static bool do_dcor(DisasContext *ctx, arg_rr_cf *a, bool is_i)
     }
     tcg_gen_andi_reg(tmp, tmp, 0x11111111);
     tcg_gen_muli_reg(tmp, tmp, 6);
-    do_unit(ctx, a->t, tmp, load_gpr(ctx, a->r), a->cf, false,
+    do_unit(ctx, a->t, load_gpr(ctx, a->r), tmp, a->cf, false,
             is_i ? tcg_gen_add_reg : tcg_gen_sub_reg);
     return nullify_end(ctx);
 }
This page took 0.033847 seconds and 4 git commands to generate.