ts-7000
[Top] [All Lists]

Re: [ts-7000] Floating point

To:
Subject: Re: [ts-7000] Floating point
From: Lennert Buytenhek <>
Date: Mon, 27 Mar 2006 23:55:46 +0200
On Mon, Mar 27, 2006 at 01:33:12PM -0800, Cliff Blackburn wrote:

> I was able to apt-get the libfloat package and compile using -msoftfloat,
> I'm not sure but this may help. I understand when there is no hardware
> floating point available, compiling with softfloat will give a decent
> speed increase over capturing invalid instructions in the kernel and
> processing them. So it may be a better idea to do it this way anyway.

It's not as easy as that -- the hardfloat ABI is incompatible with the
softfloat ABI, so you'd have to recompile everything else too.

There are two different (independent) things here:
- ABI (i.e. how to pass floating point values into functions and how
  to return floating point values from functions); and
- whether to use floating point instructions or not.

The regular ARM float ABI returns floating point values in f0, an FPA
floating point register in the FPA fp coprocessor that hardly any ARM
cores have hardware support for, so moving stuff into/from f0 requires
entering the kernel to call fp emulation code.  Emulating floating
point ops in software while still using this 'hardfloat' parameter
passing convention doesn't make much sense -- you save trapping into
the kernel for every fp op, but you're still trapping into the kernel
on every function return at least.

The softfloat ABI fixes this by never passing floating point values
in floating point registers.

When you're using the softfloat ABI, you still have the choice whether
to have gcc emit 'real' floating point instructions, or to emulate them
in software.  The former option is specified with -mfloat-abi=softfp,
the latter is -mfloat-abi=soft.


cheers,
Lennert


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU