[Ecls-list] ECL on iPhone

Martin Guy martinwguy at yahoo.it
Tue Sep 9 11:19:54 UTC 2008


> the offending section in fenv.h is:
> /*  We require VFP for this set of interfaces to work  */
>  #if !defined(__VFP_FP__) || defined(__SOFTFP__)
>     #error  This fenv header and set of APIs is intended for the ARM (with
> VFP) architecture only.
> #endif
>
> Unfortunately I don't know what VFP_FP means.  I am guessing that I am not
> including some necessary headers, but I don't know what they are.

VFP_FP means it is storing floating point words in IEEE-754
little-endian format, instead of the old bizarre middle-endian FPA
format (45670123), either because it is using real hard VFP floating
point instructions (-mfpu=vfp -mfloat-abi=softfp) or because it is
using soft-float and storing doubles in pure little-endian format
(01234567)

  It's complicated.
  ARMs themselves have no FPU, but are sometimes produced by various
people with different math coprocessors on the die, including the
ancient FPA, the modern VFP and the buggy Cirrrus Maverick Crunch.
  The situation is worsened by the recent ABI change, "EABI", which
impacts the FP situation. There are also three floating point ABI
variants to choose from: -mfloat-abi=hard, soft or softfp, which uses
hardfloat inside functions but passes arguments and return values in
the integer CPU's registers, so that you can ue hardfloat and link to
softfloat libraries.

 First see wiki.debian.org/ArmEabiPort for details of old and new ABI
and FP issues, then the questions are:
- which major ABI does the iPhone use?
- does it have a real VFP unit?
- if it does, is it using it?
- what difference does all this make to the code in that #if? Is it
dealing with real floating point hardware instructions or settings, or
does it depend on the float ABI or storage format?

In the linux systems I have here, there is no mention of VFP_FP in any
of the fenv.h variants, old or new ABI, so I can't see, but your
solution may be down to getting  the right combination of ABI and
-mfloat-abi and -mfpu to match the iPhone.

   M




More information about the ecl-devel mailing list