Several bits and pieces of input.

1. The gcc manual, ARM section, says -mhard-float is the default.

2. That doesn't seem to be true, because -mhard-float is not accepted
  on the compiler command line.
  I wrote a very simple program to fiddle with. Compiling it with
  different options gives this :

dannypc: {101} arm-wince-cegcc-gcc -msoft-float -g -D_WIN32_IE=0x0400
-D_WIN32_WCE=0x0400 -o floats.exe float.c -lmmtimer
Info: resolving _CRT_MT by linking to __imp__CRT_MT (auto-import)
dannypc: {102} arm-wince-cegcc-gcc -mhard-float -g -D_WIN32_IE=0x0400
-D_WIN32_WCE=0x0400 -o floath.exe float.c -lmmtimer
float.c:1: sorry, unimplemented: -mfloat-abi=hard and VFP

3. Your statement about ARM processors not having FPUs is not entirely
  true. Look at e.g. http://en.wikipedia.org/wiki/ARM_architecture#VFP .
  You'll find more references if you look for "arm floating point" or
  such on Yahoo! or so.
  Another example :
http://download.intel.com/design/intelxscale/27347302.pdf
  says that ARM V5 added floating point instructions to ARM V4, but
  the XScale core doesn't provide hardware support for the floating
  point instructions.

4. The program I compiled (above) gets its floating point support from
  the libgcc (included in gcc). I double-checked the executable with
  tools such as nm and objdump :-)

5. My simplistic program basically does this :

        w1 = timeGetTime();
        fprintf(f, "Time is %ld\r\n", w1);
        for (n = w1, i=0; i<30000; i++) {
                n = n * 0.34 + 3.1;
        }
        w2 = timeGetTime();
        fprintf(f, "Time is %ld\r\n", w2);
        fprintf(f, "Difference : %ld\r\n", w2 - w1);

and outputs
        Time is 9411223
        Time is 9411265
        Difference : 42

Those should be milli-seconds. This is on a Mio 168 (Intel PXA 255).

My conclusion : it's gcc, not Windows, that handles the floating point.
The only thing that can be improved appears to be the documentation. But
that's a universal truth.

        Danny

On Wed, 2007-04-11 at 15:21 +0200, Klaus Rechert wrote:
> Hi,
> 
> i wonder how fpu-calls are handled on WinCE. AFAIK arm cpus do not have FPU 
> units. Cegcc is not compiled with soft-float support, therefore i assume the 
> wince kernel takes care of fpu-emulation. Should not be gcc soft-float 
> support enabled by default, since in general it is faster than kernel 
> emulation ?
> 
>       Klaus
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to