All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chih-Min Chao <chihmin.chao@sifive.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Frank Chang <frank.chang@sifive.com>,
	Alistair Francis <alistair23@gmail.com>,
	"open list:RISC-V" <qemu-riscv@nongnu.org>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	liuzhiwei <zhiwei_liu@c-sky.com>
Subject: Re: [PATCH v2 3/7] target/riscv: Generate nanboxed results from trans_rvf.inc.c
Date: Thu, 6 Aug 2020 14:24:58 +0800	[thread overview]
Message-ID: <CAEiOBXV8A65PzDExGXwFWDJqQCShK_93ZpBAzeqAP0U4C3s3UA@mail.gmail.com> (raw)
In-Reply-To: <20200724002807.441147-4-richard.henderson@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1880 bytes --]

On Fri, Jul 24, 2020 at 8:28 AM Richard Henderson <
richard.henderson@linaro.org> wrote:

> Make sure that all results from inline single-precision scalar
> operations are properly nan-boxed to 64-bits.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/riscv/insn_trans/trans_rvf.inc.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/target/riscv/insn_trans/trans_rvf.inc.c
> b/target/riscv/insn_trans/trans_rvf.inc.c
> index c7057482e8..264d3139f1 100644
> --- a/target/riscv/insn_trans/trans_rvf.inc.c
> +++ b/target/riscv/insn_trans/trans_rvf.inc.c
> @@ -167,6 +167,7 @@ static bool trans_fsgnj_s(DisasContext *ctx,
> arg_fsgnj_s *a)
>          tcg_gen_deposit_i64(cpu_fpr[a->rd], cpu_fpr[a->rs2],
> cpu_fpr[a->rs1],
>                              0, 31);
>      }
> +    gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]);
>      mark_fs_dirty(ctx);
>      return true;
>  }
> @@ -183,6 +184,7 @@ static bool trans_fsgnjn_s(DisasContext *ctx,
> arg_fsgnjn_s *a)
>          tcg_gen_deposit_i64(cpu_fpr[a->rd], t0, cpu_fpr[a->rs1], 0, 31);
>          tcg_temp_free_i64(t0);
>      }
> +    gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]);
>      mark_fs_dirty(ctx);
>      return true;
>  }
> @@ -199,6 +201,7 @@ static bool trans_fsgnjx_s(DisasContext *ctx,
> arg_fsgnjx_s *a)
>          tcg_gen_xor_i64(cpu_fpr[a->rd], cpu_fpr[a->rs1], t0);
>          tcg_temp_free_i64(t0);
>      }
> +    gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]);
>      mark_fs_dirty(ctx);
>      return true;
>  }
> @@ -369,6 +372,7 @@ static bool trans_fmv_w_x(DisasContext *ctx,
> arg_fmv_w_x *a)
>  #else
>      tcg_gen_extu_i32_i64(cpu_fpr[a->rd], t0);
>  #endif
> +    gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]);
>
>      mark_fs_dirty(ctx);
>      tcg_temp_free(t0);
> --
> 2.25.1
>
>
>
Reviewed-by: Chih-Min Chao <chihmin.chao@sifive.com>

Chih-Min Chao

[-- Attachment #2: Type: text/html, Size: 2811 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Chih-Min Chao <chihmin.chao@sifive.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Frank Chang <frank.chang@sifive.com>,
	 Alistair Francis <alistair23@gmail.com>,
	"open list:RISC-V" <qemu-riscv@nongnu.org>,
	 liuzhiwei <zhiwei_liu@c-sky.com>
Subject: Re: [PATCH v2 3/7] target/riscv: Generate nanboxed results from trans_rvf.inc.c
Date: Thu, 6 Aug 2020 14:24:58 +0800	[thread overview]
Message-ID: <CAEiOBXV8A65PzDExGXwFWDJqQCShK_93ZpBAzeqAP0U4C3s3UA@mail.gmail.com> (raw)
In-Reply-To: <20200724002807.441147-4-richard.henderson@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1880 bytes --]

On Fri, Jul 24, 2020 at 8:28 AM Richard Henderson <
richard.henderson@linaro.org> wrote:

> Make sure that all results from inline single-precision scalar
> operations are properly nan-boxed to 64-bits.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/riscv/insn_trans/trans_rvf.inc.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/target/riscv/insn_trans/trans_rvf.inc.c
> b/target/riscv/insn_trans/trans_rvf.inc.c
> index c7057482e8..264d3139f1 100644
> --- a/target/riscv/insn_trans/trans_rvf.inc.c
> +++ b/target/riscv/insn_trans/trans_rvf.inc.c
> @@ -167,6 +167,7 @@ static bool trans_fsgnj_s(DisasContext *ctx,
> arg_fsgnj_s *a)
>          tcg_gen_deposit_i64(cpu_fpr[a->rd], cpu_fpr[a->rs2],
> cpu_fpr[a->rs1],
>                              0, 31);
>      }
> +    gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]);
>      mark_fs_dirty(ctx);
>      return true;
>  }
> @@ -183,6 +184,7 @@ static bool trans_fsgnjn_s(DisasContext *ctx,
> arg_fsgnjn_s *a)
>          tcg_gen_deposit_i64(cpu_fpr[a->rd], t0, cpu_fpr[a->rs1], 0, 31);
>          tcg_temp_free_i64(t0);
>      }
> +    gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]);
>      mark_fs_dirty(ctx);
>      return true;
>  }
> @@ -199,6 +201,7 @@ static bool trans_fsgnjx_s(DisasContext *ctx,
> arg_fsgnjx_s *a)
>          tcg_gen_xor_i64(cpu_fpr[a->rd], cpu_fpr[a->rs1], t0);
>          tcg_temp_free_i64(t0);
>      }
> +    gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]);
>      mark_fs_dirty(ctx);
>      return true;
>  }
> @@ -369,6 +372,7 @@ static bool trans_fmv_w_x(DisasContext *ctx,
> arg_fmv_w_x *a)
>  #else
>      tcg_gen_extu_i32_i64(cpu_fpr[a->rd], t0);
>  #endif
> +    gen_nanbox_s(cpu_fpr[a->rd], cpu_fpr[a->rd]);
>
>      mark_fs_dirty(ctx);
>      tcg_temp_free(t0);
> --
> 2.25.1
>
>
>
Reviewed-by: Chih-Min Chao <chihmin.chao@sifive.com>

Chih-Min Chao

[-- Attachment #2: Type: text/html, Size: 2811 bytes --]

  parent reply	other threads:[~2020-08-06 12:02 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24  0:28 [PATCH v2 0/7] target/riscv: NaN-boxing for multiple precison Richard Henderson
2020-07-24  0:28 ` Richard Henderson
2020-07-24  0:28 ` [PATCH v2 1/7] target/riscv: Generate nanboxed results from fp helpers Richard Henderson
2020-07-24  0:28   ` Richard Henderson
2020-07-24  2:35   ` LIU Zhiwei
2020-07-24  2:35     ` LIU Zhiwei
2020-07-24  3:55     ` Richard Henderson
2020-07-24  3:55       ` Richard Henderson
2020-07-24  6:05       ` LIU Zhiwei
2020-07-24  6:05         ` LIU Zhiwei
2020-08-06  6:09         ` Chih-Min Chao
2020-08-06  6:09           ` Chih-Min Chao
2020-08-06  7:05           ` LIU Zhiwei
2020-08-06  7:05             ` LIU Zhiwei
2020-08-06  8:42             ` Chih-Min Chao
2020-08-06  8:42               ` Chih-Min Chao
2020-08-06 10:02               ` LIU Zhiwei
2020-08-06 10:02                 ` LIU Zhiwei
2020-07-24  0:28 ` [PATCH v2 2/7] target/riscv: Generalize gen_nanbox_fpr to gen_nanbox_s Richard Henderson
2020-07-24  0:28   ` Richard Henderson
2020-07-24  2:39   ` LIU Zhiwei
2020-07-24  2:39     ` LIU Zhiwei
2020-08-06  6:24   ` Chih-Min Chao
2020-08-06  6:24     ` Chih-Min Chao
2020-07-24  0:28 ` [PATCH v2 3/7] target/riscv: Generate nanboxed results from trans_rvf.inc.c Richard Henderson
2020-07-24  0:28   ` Richard Henderson
2020-07-24  2:41   ` LIU Zhiwei
2020-07-24  2:41     ` LIU Zhiwei
2020-08-06  6:24   ` Chih-Min Chao [this message]
2020-08-06  6:24     ` Chih-Min Chao
2020-07-24  0:28 ` [PATCH v2 4/7] target/riscv: Check nanboxed inputs to fp helpers Richard Henderson
2020-07-24  0:28   ` Richard Henderson
2020-07-24  2:47   ` LIU Zhiwei
2020-07-24  2:47     ` LIU Zhiwei
2020-07-24  3:59     ` Richard Henderson
2020-07-24  3:59       ` Richard Henderson
2020-08-06  6:26   ` Chih-Min Chao
2020-08-06  6:26     ` Chih-Min Chao
2020-07-24  0:28 ` [PATCH v2 5/7] target/riscv: Check nanboxed inputs in trans_rvf.inc.c Richard Henderson
2020-07-24  0:28   ` Richard Henderson
2020-07-24  6:04   ` LIU Zhiwei
2020-07-24  6:04     ` LIU Zhiwei
2020-08-06  6:27   ` Chih-Min Chao
2020-08-06  6:27     ` Chih-Min Chao
2020-08-07 20:24   ` Chih-Min Chao
2020-08-07 20:24     ` Chih-Min Chao
2020-08-08 14:18     ` LIU Zhiwei
2020-08-08 14:18       ` LIU Zhiwei
2020-08-08 23:06       ` LIU Zhiwei
2020-08-08 23:06         ` LIU Zhiwei
2020-07-24  0:28 ` [PATCH v2 6/7] target/riscv: Clean up fmv.w.x Richard Henderson
2020-07-24  0:28   ` Richard Henderson
2020-08-06  6:28   ` Chih-Min Chao
2020-08-06  6:28     ` Chih-Min Chao
2020-07-24  0:28 ` [PATCH v2 7/7] target/riscv: check before allocating TCG temps Richard Henderson
2020-07-24  0:28   ` Richard Henderson
2020-08-06  6:28   ` Chih-Min Chao
2020-08-06  6:28     ` Chih-Min Chao
2020-07-24  2:31 ` [PATCH v2 0/7] target/riscv: NaN-boxing for multiple precison LIU Zhiwei
2020-07-24  2:31   ` LIU Zhiwei
2020-07-27 23:37 ` Alistair Francis
2020-07-27 23:37   ` Alistair Francis

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=CAEiOBXV8A65PzDExGXwFWDJqQCShK_93ZpBAzeqAP0U4C3s3UA@mail.gmail.com \
    --to=chihmin.chao@sifive.com \
    --cc=alistair23@gmail.com \
    --cc=frank.chang@sifive.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=zhiwei_liu@c-sky.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.