mbox series

[0/6] target/riscv: NaN-boxing for multiple precison

Message ID 20200626205917.4545-1-zhiwei_liu@c-sky.com
Headers show
Series target/riscv: NaN-boxing for multiple precison | expand

Message

LIU Zhiwei June 26, 2020, 8:59 p.m. UTC
Multiple precison shoule be supported by NaN-boxing. That means, we should
flush not valid NaN-boxing input to canonical NaN before effective
calculation and we should NaN-boxing the result after the effective
calculation.

In this patch set, split the implementation to three steps for compute,
sign-injection, and some covert insns, which are check_nanboxed,
effective calculation and gen_nanbox_fpr.

Check_nanboxed checks the inputs and flushes not valid inputs to cancical NaN.
Effective calculation is direct calculation on fp32 values.
Gen_nanbox_fpr does the NaN-boxing, writing the 1s to upper 32 bits.

LIU Zhiwei (6):
  target/riscv: move gen_nanbox_fpr to translate.c
  target/riscv: NaN-boxing compute, sign-injection and convert
    instructions.
  target/riscv: Check for LEGAL NaN-boxing
  target/riscv: check before allocating TCG temps
  target/riscv: Flush not valid NaN-boxing input to canonical NaN
  target/riscv: clean up fmv.w.x

 target/riscv/insn_trans/trans_rvd.inc.c |  16 +-
 target/riscv/insn_trans/trans_rvf.inc.c | 317 +++++++++++++++++++-----
 target/riscv/translate.c                |  43 ++++
 3 files changed, 306 insertions(+), 70 deletions(-)