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 02:42:23 UTC 2016


Krzysztof Parzyszek kristof at swissmail.org wrote on Wed Sep 7 23:03:03 UTC 2016

> What about this? https://reviews.llvm.org/D13351
> 
> 
> -Krzysztof
> 
> On 9/7/2016 5:50 PM, Krzysztof Parzyszek wrote:
> > What are the requirements for soft-float, i.e. what conditions exactly
> > does the generated code need to meet? Is the purpose of it to eliminate
> > the use of floating point registers?
> >
> > Is there a library that implements the floating point operations? If
> > not, that is going to be the main obstacle.
> >
> > -Krzysztof

https://reviews.llvm.org/D13351 is for ppc32 (TARGET_ARCH=powerpc in FreeBSD terms), not ppc64 (TARGET_ARCH=powerpc64 in FreeBSD terms).

As Justin Hibbits wrote in answer to what soft-float is used for:

> Soft float is required when building the kernel to prevent the compiler from using floating point optimizations.
> 
> - - Justin


I think that "optimizations" here means (in part?) avoiding the floating point hardware as the kernel need not save/restore the registers and the like for its own activities. Only user-space gets that service as I understand.

I have used clang/clang++ to do a partially-working FreeBSD buildworld for TARGET_ARCH=powerpc (ppc32) based on https://reviews.llvm.org/D13351 material having been included in clang 3.8.0. (I had to temporarily modify the kernel to have a so-called "red-zone" on the stack for signal delivery, effectively stepping outside FreeBSD's TARGET_ARCH=powerpc related ABI standard.)

But TARGET_ARCH=powerpc64 just reports that clang does not have softfloat and the build stops as things are.

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



More information about the freebsd-ppc mailing list