qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sven Schnelle <svens@stackframe.org>
To: qemu-devel@nongnu.org
Cc: deller@gmx.de, Sven Schnelle <svens@stackframe.org>,
	Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH 5/5] target/hppa: fix dcor instruction
Date: Mon, 11 Feb 2019 19:19:07 +0100	[thread overview]
Message-ID: <20190211181907.2219-6-svens@stackframe.org> (raw)
In-Reply-To: <20190211181907.2219-2-svens@stackframe.org>

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>
---
 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 d858fabd3a..69c5a558fc 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -2797,7 +2797,7 @@ static DisasJumpType trans_dcor(DisasContext *ctx, uint32_t insn,
     }
     tcg_gen_andi_reg(tmp, tmp, 0x11111111);
     tcg_gen_muli_reg(tmp, tmp, 6);
-    ret = do_unit(ctx, rt, tmp, load_gpr(ctx, r2), cf, false,
+    ret = do_unit(ctx, rt, load_gpr(ctx, r2), tmp, cf, false,
                   is_i ? tcg_gen_add_reg : tcg_gen_sub_reg);
 
     return nullify_end(ctx, ret);
-- 
2.20.1

  parent reply	other threads:[~2019-02-11 18:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 18:19 [Qemu-devel] [PATCH 1/5] target/hppa: move GETPC to HELPER() functions Sven Schnelle
2019-02-11 18:19 ` [Qemu-devel] [PATCH 2/5] target/hppa: fix '</<=' conditions Sven Schnelle
2019-02-12  4:26   ` Richard Henderson
2019-02-11 18:19 ` [Qemu-devel] [PATCH 3/5] target/hppa: fix log conditions Sven Schnelle
2019-02-12  4:30   ` Richard Henderson
2019-02-11 18:19 ` [Qemu-devel] [PATCH 4/5] target/hppa: fix sed conditions Sven Schnelle
2019-02-12  4:27   ` Richard Henderson
2019-02-14  8:10     ` Sven Schnelle
2019-02-11 18:19 ` Sven Schnelle [this message]
2019-02-12  4:30   ` [Qemu-devel] [PATCH 5/5] target/hppa: fix dcor instruction Richard Henderson
2019-02-12  0:07 ` [Qemu-devel] [PATCH 1/5] target/hppa: move GETPC to HELPER() functions Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190211181907.2219-6-svens@stackframe.org \
    --to=svens@stackframe.org \
    --cc=deller@gmx.de \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).