mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
target/riscv: Use tcg_constant_*
Replace uses of tcg_const_* with the allocate and free close together. Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210823195529.560295-2-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
2a4b408930
commit
05b80ed0a1
3 changed files with 34 additions and 70 deletions
|
@ -200,12 +200,11 @@ static bool trans_fsgnjn_s(DisasContext *ctx, arg_fsgnjn_s *a)
|
|||
* Replace bit 31 in rs1 with inverse in rs2.
|
||||
* This formulation retains the nanboxing of rs1.
|
||||
*/
|
||||
mask = tcg_const_i64(~MAKE_64BIT_MASK(31, 1));
|
||||
mask = tcg_constant_i64(~MAKE_64BIT_MASK(31, 1));
|
||||
tcg_gen_nor_i64(rs2, rs2, mask);
|
||||
tcg_gen_and_i64(rs1, mask, rs1);
|
||||
tcg_gen_or_i64(cpu_fpr[a->rd], rs1, rs2);
|
||||
|
||||
tcg_temp_free_i64(mask);
|
||||
tcg_temp_free_i64(rs2);
|
||||
}
|
||||
tcg_temp_free_i64(rs1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue