diff options
author | Sven Schnelle <svens@stackframe.org> | 2019-02-11 19:19:07 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2019-02-12 08:59:21 -0800 |
commit | 60e29463bbfcf72500c00eb102d1c388c87057ba (patch) | |
tree | d0a6d3a99d1ac1f8ca80ff63de8b4bc6c3055cc0 /target/hppa/translate.c | |
parent | b47a4a02908d31a2a24b5eddcae021c58d33df32 (diff) | |
download | qemu-60e29463bbfcf72500c00eb102d1c388c87057ba.zip |
target/hppa: fix dcor instruction
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 <svens@stackframe.org>
Message-Id: <20190211181907.2219-6-svens@stackframe.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hppa/translate.c')
-rw-r--r-- | target/hppa/translate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 026ba5cb3e..b4fd307b77 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -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); } |