qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jiang <ianjiang.ict@gmail.com>
To: qemu-devel@nongnu.org
Cc: Alistair.Francis@wdc.com, palmer@dabbelt.com,
	Ian Jiang <ianjiang.ict@gmail.com>,
	sagark@eecs.berkeley.edu, kbastian@mail.uni-paderborn.de
Subject: [PATCH] riscv: Format Rd of FMV.W.X with NoN-boxing
Date: Wed, 22 Jan 2020 15:24:48 +0800	[thread overview]
Message-ID: <20200122072448.18510-1-ianjiang.ict@gmail.com> (raw)

For FMV.W.X that moves the lower 32 bits of an integer register to a
floating-point register, Rd should encoded with NoN-boxing scheme.
Note: This applies to RV64 only.

Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com>
---
 target/riscv/insn_trans/trans_rvf.inc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/riscv/insn_trans/trans_rvf.inc.c b/target/riscv/insn_trans/trans_rvf.inc.c
index 172dbfa919..62b7a36567 100644
--- a/target/riscv/insn_trans/trans_rvf.inc.c
+++ b/target/riscv/insn_trans/trans_rvf.inc.c
@@ -368,6 +368,7 @@ static bool trans_fmv_w_x(DisasContext *ctx, arg_fmv_w_x *a)
 
 #if defined(TARGET_RISCV64)
     tcg_gen_mov_i64(cpu_fpr[a->rd], t0);
+    tcg_gen_ori_i64(cpu_fpr[a->rd], cpu_fpr[a->rd], 0xffffffff00000000ULL);
 #else
     tcg_gen_extu_i32_i64(cpu_fpr[a->rd], t0);
 #endif
-- 
2.17.1



             reply	other threads:[~2020-01-22  7:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22  7:24 Ian Jiang [this message]
2020-01-22  8:53 ` [PATCH] riscv: Format Rd of FMV.W.X with NoN-boxing Richard Henderson
2020-01-22  9:53   ` Ian Jiang
2020-01-22 17:10     ` Richard Henderson
2020-01-23  0:48       ` Ian Jiang
2020-01-23  3:07         ` Richard Henderson
2020-01-23  4:05           ` Ian Jiang
2020-01-23 18:52             ` Richard Henderson
2020-01-27 14:17               ` Ian Jiang

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=20200122072448.18510-1-ianjiang.ict@gmail.com \
    --to=ianjiang.ict@gmail.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=palmer@dabbelt.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sagark@eecs.berkeley.edu \
    /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).