[libre-riscv-dev] Introduction

Luke Kenneth Casson Leighton lkcl at lkcl.net
Tue Feb 5 01:03:54 GMT 2019


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

On Tue, Feb 5, 2019 at 12:05 AM Jacob Lifshay <programmerjake at gmail.com> wrote:
>
> On Mon, Feb 4, 2019, 15:59 Luke Kenneth Casson Leighton <lkcl at lkcl.net
> wrote:
>
> > On Mon, Feb 4, 2019 at 11:45 PM Jacob Lifshay <programmerjake at gmail.com>
> > wrote:
> > >
> > > lets use python then.
> >
> > checking....
> >
> > # pip3 install sfpy
> > $ python3
> > >>> import sfpy
> > >>> sfpy.Float16.from_bits(0x10)
> > Float16(9.5367431640625e-07)
> > >>> sfpy.Float16.from_bits(0x1000)
> > Float16(0.00048828125)
> > >>> sfpy.Float16.from_bits(0x0000)
> > Float16(0.0)
> >
> > main concern alleviated, there's a conversion from hex (bits)
> >
> > has all of the functions from berkeley softfloat3 all there.
> >
> no, it doesn't (assuming you posted the complete list).
> it's missing tininess before/after rounding, which RISC-V defines to be
> after rounding.

ah well spotted.  RISCV/specialize.h... arse.  ok tracking that
through to the Makefile "build/Linux-x86_64-GCC/Makefile":
SPECIALIZE_TYPE ?= 8086-SSE

okaay, so *sigh* it'll be necessary to build from source (rather than
just pip3 install sfpy), over-riding that with SPECIALIZE_TYPE=RISCV
to bring in that functionality.

> Also, not that we will need it, it's missing extFloat80 and Float128.

 yehyeh.  well, if anyone later down the line wants to contribute that... :)

l.



More information about the libre-riscv-dev mailing list