From: Scott Wood <scottwood@freescale.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 03/18] Set -msoft-float and assembler target options in the bootwrapper.
Date: Wed, 24 Jan 2007 16:18:47 -0600 [thread overview]
Message-ID: <45B7DB47.4070400@freescale.com> (raw)
In-Reply-To: <52B7EC8B-85EB-408C-97B7-806F8822B7A3@kernel.crashing.org>
Segher Boessenkool wrote:
>> Without -msoft-float, floating point state saving code can be executed
>> (at least with certain buggy versions of GCC, which don't clear bit 6 of
>> CR before calling a varargs function with no varargs parameters).
>
>
> I have a hard time understanding what this means. Can you
> elaborate please?
The PowerPC ABI uses bit 6 of CR to indicate to a varargs function
whether one (or more) of the varargs parameters is floating point. This
is used (among other things) by the varargs function to determine
whether to save a floating point context. Normally, GCC will clear the
bit when calling a vararg function with integer-only parameters, but at
least some versions (I saw it on 3.4.3) will not touch the bit at all
when the varargs list is empty.
Since the functions in string.S use cr1 (which contains bit 6), this
caused a fault on e500 (which doesn't have a normal floating point unit)
when I called strcmp() followed by printf() of a bare string with no
other arguments.
>> AFLAGS += $(cpu-as-y)
>> CFLAGS += $(cpu-as-y)
>> +export cpu-as-y
>
>
> Maybe it would be better to export CFLAGS instead (on the
> other hand, you might have to cut out some options from it
> for 32-bit compiles, dunno).
That'd also bring in the normal Linux headers, which the bootwrapper
appears to be trying to avoid.
-Scott
next prev parent reply other threads:[~2007-01-24 22:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-24 21:07 [PATCH 03/18] Set -msoft-float and assembler target options in the bootwrapper Scott Wood
2007-01-24 21:31 ` Segher Boessenkool
2007-01-24 22:18 ` Scott Wood [this message]
2007-01-24 22:45 ` Segher Boessenkool
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45B7DB47.4070400@freescale.com \
--to=scottwood@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=segher@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).