From llvm: Fwd: [Bug 26519] Clang 3.8.0's "Target: powerpc-unknown-freebsd11.0" code generation is violating the SVR4 ABI (SEGV can result) [fixed in llvm -r280705]
Mark Millard
markmi at dsl-only.net
Thu Sep 8 20:04:42 UTC 2016
Krzysztof Parzyszek kristof at swissmail.org on Thu Sep 8 13:01:44 UTC 2016 wrote:
> Thanks, this helps. The kernel may not need this, but in general
> soft-float needs to generate library calls for floating-point
> operations. Is there a library for those for powerpc64? The compiler
> will need to know at least the names and parameters of these functions.
>
> -Krzysztof
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160523/159625.html for the recent enabling of adding soft-float for sparc says:
> The user should ensure a library (such as the builtins from Compiler-RT) that includes the software floating point routines is provided.
As I read this it appears that the library has to match the compiler, instead of the compiler being made to match the library --and at least sometimes compiler-rt has that matching material.
Since TARGET_ARCH=powerpc has the soft-float support I looked in:
https://svnweb.freebsd.org/base/stable/11/contrib/compiler-rt/lib/builtins/ppc/
and see that it has:
DD.h
divtc3.c
fixrfdi.c
floatunstfdi.c
floatditf.c
floatunditf.c
gcc_qadd.c
gcc_qdiv.c
gcc_qmul.c
gcc_qsub.c
multc3.c
restFP.S
saveFP.S
Note that FreeBSD is not the originator of compiler-rt. Instead FreeBSD takes compiler-rt in from outside: the above is from some variant/version of what is for truck visible at:
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/ppc/
I do not know what would need to be different for TARGET_ARCH=powerpc64 .
By contrast
https://svnweb.freebsd.org/base/stable/11/contrib/compiler-rt/lib/builtins/sparc64/
has:
divmod.m4
divsi3.S
generate.sh
modsi3.S
udivsi3.S
umodsi3.S
But there seems to be no match on llvm.org for these for sparc64. So sometimes FreeBSD does have unique material in compiler-rt.
As for more generic material common across architectures:
https://svnweb.freebsd.org/base/stable/11/contrib/compiler-rt/lib/builtins/
and (showing trunk again)
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/
have more generic material, including more floating-point material. (I'll not list it all.)
Side note:
Attempting to CC you on an earlier message got a non-delivery notice that said, in part:
Connected to mail3.swissmail.org:212.25.22.133 but recipient was rejected. STARTTLS proto=TLSv1; cipher=DHE-RSA-AES256-SHA.
Remote host said: 450 4.2.0 <kristof at swissmail.org>: Recipient address rejected: Greylisted, see http://postgrey.schweikert.ch/help/swissmail.org.html
(There is a " at " replacement in the above that was not in the original.)
===
Mark Millard
markmi at dsl-only.net
More information about the freebsd-ppc
mailing list