This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 6/9] RISC-V: Split the soft-fp into rv32 and rv64
Richard Henderson <rth@twiddle.net> 於 2018年7月13日 週五 上午1:46寫道:
>
> On 07/12/2018 05:26 AM, Zong Li wrote:
> > The soft-fp not support long double calculation on 32 bit.
>
> The generic soft-fp implementation certainly does support ieee128 on a 32-bit
> host. You probably have misconfigured sfp-machine.h.
>
> What problem are you encountering?
>
>
> r~
Hi Richard,
I encountered some macro were not defined. This is one of my cases.
When I built the soft-fp/s_fmal.c, there uses the FP_FMA_Q in __fmal.
I define the _FP_W_TYPE_SIZE is 32 in sysdeps/riscv/sfp-machine.h,
so the FP_FMA_Q was defined to _FP_FMA (Q, 4, 8, R, X, Y, Z) in soft-fp/quad.h.
Something in the soft-fp/quad.h:
#if _FP_W_TYPE_SIZE < 64
# define FP_FMA_Q(R, X, Y, Z) _FP_FMA (Q, 4, 8, R, X, Y, Z)
#else
# define FP_FMA_Q(R, X, Y, Z) _FP_FMA (Q, 2, 4, R, X, Y, Z)
#endif
This is the problem I encountered, In _FP_FMA (fs, wc, dwc, R, X, Y, Z),
it will use the _FP_FRAC_HIGHBIT_DW_##dwc macro, and it will be expanded to
_FP_FRAC_HIGHBIT_DW_8, but the _FP_FRAC_HIGHBIT_DW_8 is not be
implemented in soft-fp/op-8.h, there is only _FP_FRAC_HIGHBIT_DW_1,
_FP_FRAC_HIGHBIT_DW_2 and _FP_FRAC_HIGHBIT_DW_4 in the soft-fp/op-*.h.
I cannot find another 32 bit port has this issue, because they use the ldbl-128.
Did I miss something here?