[Libre-soc-dev] New instruction

Jacob Lifshay programmerjake at gmail.com
Tue Mar 2 18:11:19 GMT 2021


On Tue, Mar 2, 2021, 09:56 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

> On Tuesday, March 2, 2021, Jacob Lifshay <programmerjake at gmail.com> wrote:
>
> >
> >> 4.6.7.3 Floating Round to Integer Instructions
> >>
> >> v3.0C p163
> >>
> >
> > Except that Javascript has different semantics for conversion from f64 ->
> > i32:
> > it is a wrapping conversion instead of the saturating conversion used by
> > most cpus.
>
> urr fer god's sake.  that means it's running a divide operation.
>

no... it turns into a single shift and mask operation at the HW
level...such is the fate of division by a constant power of 2.

>
> and everyone loves javascript, don't they. sigh :)


Yup. Wasm adoption should help there somewhat...though not right now.

Jacob


More information about the Libre-soc-dev mailing list