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 Fri, Aug 13, 2004 at 09:24:33PM +0200, Dimitry Andric wrote:

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

The header files seem to imply that VFP is not generally used on linux
(whereas on NetBSD it seems to be the default.)

Runtime switching between VFP and FPA seems to be about as useful to
me as being able to switch between ELF and COFF at runtime.  Why can't
you tell people to just hack gcc's header files and recompile, or
make it a gcc build-time option (as parameter to configure or so)?


> 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!

This makes sense to me, though, since you get the same behaviour with
many other options, like the ones of the form -f{,no-}some-option (for
example, -f{,no-}strict-aliasing.)


> 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.

To me, this would seem because then you can use one set of installed
binutils for different sets of installed gccs.  It also makes sense
because the assembler doesn't really care about what calling convention
you use.


> 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.

My reasoning is thus: it makes little sense to me to change the default,
because since this is rather a niche sector, you'd expect people who care
about performance and don't care about breaking binary compatibility to
be able to find the FPA/VFP toggle themselves, no?


> > 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. :)

My thought right now is that fpa/vfp should be fixed at gcc compile time.
Do you have any compelling reasons why this shouldn't be so? :)


thanks,
Lennert

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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