* Re: [Qemu-devel] [PULL 11/29] target/riscv: Convert RV32F insns to decodetree
[not found] ` <20190312131526.14710-12-palmer@sifive.com>
@ 2023-03-06 14:11 ` Philippe Mathieu-Daudé
2023-03-06 20:22 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-06 14:11 UTC (permalink / raw)
To: Palmer Dabbelt, Bastian Koppelmann
Cc: Peter Maydell, Peer Adelt, qemu-riscv, qemu-devel,
Alistair Francis
Hi Palmer, Bastian,
(old patch)
On 12/3/19 14:15, Palmer Dabbelt wrote:
> From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
>
> Acked-by: Alistair Francis <alistair.francis@wdc.com>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> Signed-off-by: Peer Adelt <peer.adelt@hni.uni-paderborn.de>
> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
> ---
> target/riscv/insn32.decode | 35 +++
> target/riscv/insn_trans/trans_rvf.inc.c | 379 ++++++++++++++++++++++++
> target/riscv/translate.c | 1 +
> 3 files changed, 415 insertions(+)
> create mode 100644 target/riscv/insn_trans/trans_rvf.inc.c
> +static bool trans_fmv_x_w(DisasContext *ctx, arg_fmv_x_w *a)
> +{
> + /* NOTE: This was FMV.X.S in an earlier version of the ISA spec! */
> + REQUIRE_FPU;
> + REQUIRE_EXT(ctx, RVF);
> +
> + TCGv t0 = tcg_temp_new();
> +
> +#if defined(TARGET_RISCV64)
Just noticed this while reviewing Richard's "tcg: Remove tcg_const_*'
recent series, shouldn't be this #if condition inverted?
> + tcg_gen_ext32s_tl(t0, cpu_fpr[a->rs1]);
> +#else
> + tcg_gen_extrl_i64_i32(t0, cpu_fpr[a->rs1]);
> +#endif
> +
> + gen_set_gpr(a->rd, t0);
> + tcg_temp_free(t0);
> +
> + return true;
> +}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PULL 11/29] target/riscv: Convert RV32F insns to decodetree
2023-03-06 14:11 ` [Qemu-devel] [PULL 11/29] target/riscv: Convert RV32F insns to decodetree Philippe Mathieu-Daudé
@ 2023-03-06 20:22 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2023-03-06 20:22 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Palmer Dabbelt, Bastian Koppelmann
Cc: Peter Maydell, Peer Adelt, qemu-riscv, qemu-devel,
Alistair Francis
On 3/6/23 06:11, Philippe Mathieu-Daudé wrote:
> Hi Palmer, Bastian,
>
> (old patch)
>
> On 12/3/19 14:15, Palmer Dabbelt wrote:
>> From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
>>
>> Acked-by: Alistair Francis <alistair.francis@wdc.com>
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
>> Signed-off-by: Peer Adelt <peer.adelt@hni.uni-paderborn.de>
>> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
>> ---
>> target/riscv/insn32.decode | 35 +++
>> target/riscv/insn_trans/trans_rvf.inc.c | 379 ++++++++++++++++++++++++
>> target/riscv/translate.c | 1 +
>> 3 files changed, 415 insertions(+)
>> create mode 100644 target/riscv/insn_trans/trans_rvf.inc.c
>
>
>> +static bool trans_fmv_x_w(DisasContext *ctx, arg_fmv_x_w *a)
>> +{
>> + /* NOTE: This was FMV.X.S in an earlier version of the ISA spec! */
>> + REQUIRE_FPU;
>> + REQUIRE_EXT(ctx, RVF);
>> +
>> + TCGv t0 = tcg_temp_new();
>> +
>> +#if defined(TARGET_RISCV64)
>
> Just noticed this while reviewing Richard's "tcg: Remove tcg_const_*'
> recent series, shouldn't be this #if condition inverted?
No, you'd notice the compile error straight away.
r~
>
>> + tcg_gen_ext32s_tl(t0, cpu_fpr[a->rs1]);
>> +#else
>> + tcg_gen_extrl_i64_i32(t0, cpu_fpr[a->rs1]);
>> +#endif
>> +
>> + gen_set_gpr(a->rd, t0);
>> + tcg_temp_free(t0);
>> +
>> + return true;
>> +}
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-06 20:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190312131526.14710-1-palmer@sifive.com>
[not found] ` <20190312131526.14710-12-palmer@sifive.com>
2023-03-06 14:11 ` [Qemu-devel] [PULL 11/29] target/riscv: Convert RV32F insns to decodetree Philippe Mathieu-Daudé
2023-03-06 20:22 ` Richard Henderson
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).