This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with crosstool 0.28-pre28 supplied patch for gcc 3.3.[23] softfloat on ARM


On 2004-08-10 at 07:33:41 Dan Kegel wrote:

>> http://www.andric.com/cross/patches/gcc-3.4.0-arm-softfloat.patch.bz2
[...]
> Does this patch still apply cleanly to gcc-3.4.1?

Yes, even with --fuzz=0. :)


> Is it suitable for submission to mainline?

I'm not convinced it is.  This is because it alters gcc's default
behavior, which is probably unacceptable to the gcc maintainers.

However, this default behavior might be considered incomplete, because
it's currently impossible to specify that it should use software VFP:

arm-unknown-linux-gcc without options generates hardware FPA.
arm-unknown-linux-gcc -msoft-float generates software FPA.
arm-unknown-linux-gcc -mhard-float generates hardware FPA, i.e. the
same as without options!

I think a lot of precompiled ARM linux distro's and other ARM runtime
environments depend on hardware FPA code being generated, and
everything handled through the kernel's FP emulator, if there's no FPU
hardware available.

The fact is, that it would have been much better to have had a -mfpu=
option analogous to gas, so you could explicitly specify -mfpu=fpa, softfpa
or softvfp according to your needs, and then choose to have some
default compiled in at gcc build time.

Note that Nicolas writes the following in his original patch (found at
http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html ):

"Default is to use APCS-32 mode with soft-vfp.
The old Linux default for floats can be achieved with -mhard-float
or with the configure --with-float=hard option.
If -msoft-float or --with-float=soft is used then software float
support will be used just like the default but with the legacy
big endian word ordering for double float representation instead."

However, his patch does NOT achieve the effect he describes, because
he doesn't modify the gcc specs to pass the proper options to the
assembler.  That is one of the things I added to my patch.


> Have you filed a bug in gcc's bugzilla for the problems this patch fixes?

No, since it isn't really a problem, only for people who want to use
software VFP by default, and are prepared to rebuild their entire
toolkit + runtime environment using it.

However, it might be worthwile to propose a better solution, such as a
-mfpu=fpa|softfpa|softvfp option to arm-linux-gcc.  If anyone has
suggestions for this, other comments, or knows how to hack such new
options into gcc properly, please let me know. :)


> Have you sent it to gcc-patches?

I can do so, of course, but for the reason stated above, I don't think
it will stand much chance of being accepted, at least not for the
current release branches.

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]