Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Sep 2016 12:37:53 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: 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]
Message-ID:  <EB82D9DC-4868-4075-B02E-BEC3A241C9A9@dsl-only.net>

next in thread | raw e-mail | index | archive | help
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=20
> soft-float needs to generate library calls for floating-point=20
> operations. Is there a library for those for powerpc64? The compiler=20=

> will need to know at least the names and parameters of these =
functions.
>=20
> -Krzysztof

=
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160523/159625.ht=
ml 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=3Dpowerpc 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=3Dpowerpc64 =
.

By contrast=20

=
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=3DTLSv1; cipher=3DDHE-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.)

=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EB82D9DC-4868-4075-B02E-BEC3A241C9A9>