From: Segher Boessenkool <segher@kernel.crashing.org>
To: Timothy Pearson <tpearson@raptorengineering.com>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] powerpc: Add gpr1 and fpu save/restore functions
Date: Mon, 12 Feb 2024 11:30:43 -0600 [thread overview]
Message-ID: <20240212173043.GX19790@gate.crashing.org> (raw)
In-Reply-To: <1251499652.14843228.1707757778984.JavaMail.zimbra@raptorengineeringinc.com>
On Mon, Feb 12, 2024 at 11:09:38AM -0600, Timothy Pearson wrote:
> There is existing code in the kernel right now to provide support functions for gpr0 and altivec save/restore. I don't know the full story here, but at some point in the kernel's history it seems to have been decided to provide the helper functions in lieu of linking libgcc directly. If this is incorrect, then I need to know that so I can rework the patch to enable libcc and remove the existing support functions.
>
> Is there anyone on-list that knows more of the history and decision-making that went into the current state of the kernel here?
Long long time ago, linux-0.11 or something, it was discovered that some
programmiing mistakes resulted in double-length divisions (64x64->64 on
32-bit systems, say). Most architectures have no hardware support for
that, x86 is one of those; so you need very expensive support routines
to do that (_udivdi3 or _divdi3 in that case, ...ti3 on 64-bit archs).
So it was decided to not link to libgcc to avoid this. But that means
that all the extremely many other suppoort routines, more for some other
archs, are also not there. While it would have been much easier to just
link to something that provides the _{u,}divdi3 symbol and then causes a
forced linking error from that!
Segher
next prev parent reply other threads:[~2024-02-12 17:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 16:41 [PATCH] powerpc: Add gpr1 and fpu save/restore functions Timothy Pearson
2024-02-12 17:02 ` Segher Boessenkool
2024-02-12 17:09 ` Timothy Pearson
2024-02-12 17:30 ` Segher Boessenkool [this message]
2024-02-12 17:46 ` Timothy Pearson
2024-02-12 17:59 ` Segher Boessenkool
2024-02-12 18:07 ` Timothy Pearson
2024-02-12 18:23 ` Segher Boessenkool
2024-02-12 18:31 ` Timothy Pearson
2024-02-13 5:23 ` Michael Ellerman
2024-02-13 5:28 ` Timothy Pearson
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=20240212173043.GX19790@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=tpearson@raptorengineering.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.