[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Richard Henderson
Subject: Re: [PATCH 0/6] target/riscv: NaN-boxing for multiple precison
Date: Thu, 2 Jul 2020 10:37:27 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 6/26/20 1:59 PM, LIU Zhiwei wrote:
> 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.

I know I just reviewed a couple of these, but then I got to thinking about
patch 3 more closely.

I think it would be better to do all of the nan-boxing work inside of the
helpers, including the return values.

Since we must have a helper call for the actual fp arithmetic, we might as well
put the rest of the logic in there too.  That way the JIT code is smaller.

If, for RVF && !RVD, we always maintain the invariant that the values are
nanboxed anyway, then we do not even have to check for RVD at runtime.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]