[libre-riscv-dev] Introduction

Jacob Lifshay programmerjake at gmail.com
Tue Feb 5 01:08:15 GMT 2019


On Mon, Feb 4, 2019, 17:04 Luke Kenneth Casson Leighton <lkcl at lkcl.net
wrote:

> ---
> 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
>
no, the RISC-V folder is for implementing softfloat using risc-v
instructions, not for simulating them.

you want the softfloat_detectTininess variable from softfloat.h

>
> 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.
>
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev at lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
>


More information about the libre-riscv-dev mailing list