Re: Soft Floating Point Exceptions

Brian Inglis <[email protected]>
Newsgroups gmane.comp.lib.newlib
Organization Systematic Software
Message-ID <[email protected]>
On 2020-05-25 15:43, Brian Inglis wrote:
> On 2020-05-25 11:17, Joel Sherrill wrote:
>> An RTEMS GSoC student (Eshan Dhawan) has almost completed porting the
>> FreeBSD fenv code to newlib. Unfortunately, the software floating point
>> code calls  __softfloat_float_raise which has a couple of issues. First, he
>> can't find the code which probably indicates an issue in the BSD world but
>> no one likely cares because I doubt there is a BSD install on an ARM with
>> soft floating point.
>>
>> Second, to use this in newlib, we will be relying on GCC's soft float
>> implementation which means something different has to happen. Is there an
>> equivalent routine in GCC? What should happen for
>> __softfloat_float_raise()?
> 
> You will have to look at these to see what is relevant to your issue.
> 
> Interface:
> 
> $ info gccint libgcc soft
> 
> implementation:
> 
> https://gcc.gnu.org/git?p=gcc.git;a=blob_plain;f=libgcc/config/arm/sfp-machine.h;hb=HEAD
> https://gcc.gnu.org/git?p=gcc.git;a=blob_plain;f=libgcc/config/arm/ieee754-sf.S;hb=HEAD
> https://gcc.gnu.org/git?p=gcc.git;a=blob_plain;f=libgcc/config/arm/ieee754-df.S;hb=HEAD
> https://gcc.gnu.org/git?p=gcc.git;a=blob_plain;f=libgcc/config/arm/fp16.c;hb=HEAD
> 
> implementation:
> 
> https://github.com/freebsd/freebsd/commit/85aab3336e0d6172ddd5fe3cde38389abd612728
> https://github.com/freebsd/freebsd/tree/master/lib/libc/softfloat
> https://github.com/freebsd/freebsd/blob/master/lib/libc/softfloat/softfloat.txt#L357
> https://github.com/freebsd/freebsd/blob/master/lib/libc/softfloat/softfloat-for-gcc.h
> https://github.com/freebsd/freebsd/blob/master/lib/libc/softfloat/softfloat-specialize#L67
> 
> alternative:
> 
> http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/arch/arm/softfloat/
also
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/softfloat/
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc_fp/

and for latest updates:

http://www.jhauser.us/arithmetic/SoftFloat.html

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in IEC units and prefixes, physical quantities in SI.]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.