[PATCH 1/1] LoongArch: Hard Float Support Of Math Functions.

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Thu Nov 3 16:14:59 GMT 2022



On 03/11/22 11:39, Xi Ruoyao wrote:
> On Thu, 2022-11-03 at 09:42 -0300, Adhemerval Zanella Netto via Libc-alpha wrote:
>> On 03/11/22 09:14, Xiaolin Tang wrote:
> 
>>> fcopysign.{s/d                   __copysign{f/ }
>>
>> GCC already implements a generic builtin copysign that expands it without a 
>> libcall, I prefer to implement it on compiler (which I presume it will be on
>> 13, since on gcc 12 I do see fcopysign.d).  I will send a patch to remove
>> the RISCV version as well.
> 
> GCC trunk still generates some nasty thing for __builtin_copysign yet:
> 
> 	movfr2gr.d	$r12,$f1
> 	fabs.d	$f0,$f0
> 	bge	$r12,$r0,.L1
> 	fneg.d	$f0,$f0
> .L1:
> 	jr	$r1
> 
> Fortunately we still have ten days before GCC 13 stage 1 ends.  I'll try
> to fix it...
> 

Yes, this is most likely the generic lowering.


More information about the Libc-alpha mailing list