[libre-riscv-dev] fp special functions

Luke Kenneth Casson Leighton lkcl at lkcl.net
Tue Aug 6 00:25:07 BST 2019


On Monday, August 5, 2019, Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

>
>>>
>>> note that atan(x) and atanpi(x) are just atan2(x, 1.0) and atan2pi(x,
>>> 1.0),
>>> so the atan and atanpi instructions are not needed
>>
>>
>> Ok great, will move them to pseudo op aliases.
>>
>>
> Hang on... there's no immed for loading 1.0 into an FP reg, it's one of
> the downsides of RISCV, a FLD is a hard requirement.
>
> Hmmm....
>

"Hmm" means, depending on what an implementor chooses to do, cospi may be
more efficient than cos, or vice-versa.

As a standard, we don't know which, therefore, to not impose that on
implementors, we need both (mandatory)

Does that make sense?

L.



-- 
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68


More information about the libre-riscv-dev mailing list