does soft-float work?

Marcus Sundberg erammsu at
Sat Nov 20 04:06:53 EST 1999

Dan Malek <dan at> writes:

> I also remember speaking to someone that found a varargs
> and software floating point combination bug.....let me
> try and track that down.

Well, I know of one such bug in gcc:
I built gcc with --nfp/--without-fpu (don't remember what gcc calls
it) and --with-cpu=860. This causes the compiler to generate
software floating point code by default (in fact it doesn't seem to
be able to generate FPU instructions even with -mhard-float).
However, it does _not_ cause the specs file to define -D_SOFT_FLOAT
for the pre-processor by default.

This means that the caller passes fp arguments in soft-float syntax,
while the va_* macros tries to read them out in hard-float syntax.

The same problem may very well occur if you pass the compiler
-mcpu=860 but not -msoft-float. I'm not sure how to fix this
properly - here I just changed the specs file as I never compile
for PPCs with FPU.

        Marcus Sundberg        |
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan at

** Sent via the linuxppc-embedded mail list. See

More information about the Linuxppc-embedded mailing list