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. Thoughts? r~