public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Soft Floating Point Exceptions
@ 2020-05-25 17:17 Joel Sherrill
  2020-05-25 21:43 ` Brian Inglis
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Sherrill @ 2020-05-25 17:17 UTC (permalink / raw)
  To: Newlib, Eshan Dhawan

Hi

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()?

Thanks.

--joel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Soft Floating Point Exceptions
  2020-05-25 17:17 Soft Floating Point Exceptions Joel Sherrill
@ 2020-05-25 21:43 ` Brian Inglis
  2020-05-26  4:01   ` Brian Inglis
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Inglis @ 2020-05-25 21:43 UTC (permalink / raw)
  To: newlib

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/

-- 
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.]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Soft Floating Point Exceptions
  2020-05-25 21:43 ` Brian Inglis
@ 2020-05-26  4:01   ` Brian Inglis
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Inglis @ 2020-05-26  4:01 UTC (permalink / raw)
  To: newlib

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.]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-26  4:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25 17:17 Soft Floating Point Exceptions Joel Sherrill
2020-05-25 21:43 ` Brian Inglis
2020-05-26  4:01   ` Brian Inglis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).