|
From: | Richard Henderson |
Subject: | Re: [PATCH v3 3/6] target/riscv: zfh: half-precision convert and move |
Date: | Sun, 17 Oct 2021 22:53:02 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
On 10/17/21 4:59 PM, Alistair Francis wrote:
+#if defined(TARGET_RISCV64) + /* 16 bits -> 64 bits */ + tcg_gen_ext16s_tl(dest, cpu_fpr[a->rs1]); +#else + /* 16 bits -> 32 bits */ + tcg_gen_extrl_i64_i32(dest, cpu_fpr[a->rs1]); + tcg_gen_ext16s_tl(dest, dest); +#endifCan we use is_32bit(ctx) instead?
No. This is about sizeof(target_long), not the current cpu state. It would be possible to use tcg_gen_trunc_i64_tl tcg_gen_ext16s_tl but we have a couple of other instances of the same thing. r~
[Prev in Thread] | Current Thread | [Next in Thread] |