public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Joel Sherrill <joel@rtems.org>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>
Cc: Eshan Dhawan <eshandhawan51@gmail.com>, Newlib <newlib@sourceware.org>
Subject: Re: [PATCH] Remove multiple defination error
Date: Tue, 14 Jul 2020 08:11:35 -0500	[thread overview]
Message-ID: <CAF9ehCV-pa6bt8_ym5wgW--tvCKC+ZDh=R9JZ8iQ_YHKeKR0Dw@mail.gmail.com> (raw)
In-Reply-To: <794b64ce-3a7b-23a3-38d3-f6f26ebc418b@embedded-brains.de>

On Mon, Jul 13, 2020 at 12:48 AM Sebastian Huber <
sebastian.huber@embedded-brains.de> wrote:

> On 13/07/2020 07:36, Sebastian Huber wrote:
> > On 11/07/2020 19:18, Eshan Dhawan wrote:
> >>
> >>
> >> On Sat, Jul 11, 2020 at 8:46 PM Sebastian Huber
> >> <sebastian.huber@embedded-brains.de
> >> <mailto:sebastian.huber@embedded-brains.de>> wrote:
> >>
> >>     On 11/07/2020 00:41, Eshan dhawan wrote:
> >>
> >>      > Signed-off-by: Eshan dhawan<eshandhawan51@gmail.com
> >>     <mailto:eshandhawan51@gmail.com>>
> >>      > ---
> >>      >   newlib/libm/machine/arm/fenv-vfp.c |  7 ++++-
> >>      >   newlib/libm/machine/arm/fenv.c     | 47
> >>     +++++++++++++++++++-----------
> >>      >   2 files changed, 36 insertions(+), 18 deletions(-)
> >>
> >>     What are the design goals of this implementation? Should it work
> with
> >>     some sort of run time VFP detection? Should it select the support
> >> using
> >>     builtin defines?
> >>
> >> It used the GCC flags to detect VPF
> >> if VPF is not selected all the symbols of vfp won't appear :)
> >>
> >>
> >>     I would use builtin defines only and then just use a single file.
> >>
> >> I tried converting into a single file but the file becomes too complex
> >> to handle and check for errors. :)
> >
> > Complexity is always a bit subjective.
> >
> > How did you test the ARM implementation? I doubt the soft-float support
> > works at all. FreeBSD ships its own soft-float library. Newlib uses the
> > one from libgcc by default. They are not compatible.
> >
> > I guess the MIPS soft-float fenv support has this issue as well.
> >
> > Having an GCC incompatible soft-float fenv support in Newlib makes no
> > sense to me. How can we fix this? Disable it completely or return some
> > run time errors?
> >
> > Maybe we should remove the ARM fenv support from Newlib until these
> > issues are fixed and a working implementation is available.
>
> I noticed that the PowerPC fenv support unconditionally assumes that a
> floating-point unit is available. Not all PowerPC processors support a
> floating-point unit and some applications may intentionally use
> soft-float. Using this code may result in an unimplemented exception if
> MSR[FP]=1, or an FP Unavailable exception if MSR[FP]=0.
>
> If this is a desirable behaviour, then we can use the same on ARM. Just
> provide the VFP implementation. If you use the stuff in other setups you
> get an exception.
>

The RISC-V would be a good model. Jim Wilson provided some default
behavior when there is no hard FPU.

--joel

>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber@embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>

  reply	other threads:[~2020-07-14 13:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10 22:41 Eshan dhawan
2020-07-11 15:16 ` Sebastian Huber
2020-07-11 17:18   ` Eshan Dhawan
2020-07-13  5:36     ` Sebastian Huber
2020-07-13  5:48       ` Sebastian Huber
2020-07-14 13:11         ` Joel Sherrill [this message]
2020-07-14 16:59           ` Jim Wilson
2020-07-14 17:51             ` Sebastian Huber
2020-07-23 11:54 Eric Bresie
2020-07-23 12:04 ` Sebastian Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF9ehCV-pa6bt8_ym5wgW--tvCKC+ZDh=R9JZ8iQ_YHKeKR0Dw@mail.gmail.com' \
    --to=joel@rtems.org \
    --cc=eshandhawan51@gmail.com \
    --cc=newlib@sourceware.org \
    --cc=sebastian.huber@embedded-brains.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).