Thread (11 messages) flat view 11 messages, 3 authors, 2024-02-13

Re: [PATCH] powerpc: Add gpr1 and fpu save/restore functions

From: Timothy Pearson <tpearson@raptorengineering.com>
Date: 2024-02-12 17:10:30


----- Original Message -----
From: "Segher Boessenkool" <redacted>
To: "Timothy Pearson" <tpearson@raptorengineering.com>
Cc: "linuxppc-dev" <redacted>
Sent: Monday, February 12, 2024 11:02:07 AM
Subject: Re: [PATCH] powerpc: Add gpr1 and fpu save/restore functions
On Mon, Feb 12, 2024 at 10:41:18AM -0600, Timothy Pearson wrote:
quoted
Implement gpr1 and fpu save/restore functions per the ABI v2 documentation.
There is no "ABI v2".  This is the ELFv2 ABI, it is a name, it is not a
version 2 of anything (in fact, it is version 1 everywhere).
Apologies, I wasn't precise on the name.
The same functions are needed and used in other ABIs, too.

But, why do this patch?  You just need

+LIBGCC         := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)

+libs-y += $(LIBGCC)

and nothing more.  It is required for proper functioning of GCC to link
with the libgcc support library.
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?

Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help