double word ordering on little endian

Christopher Taylor chtaylo3 at
Thu Jun 5 21:06:57 UTC 2008

ok here's a test program:

#include <stdio.h>
#include <stdint.h>

void printBytes( unsigned char* ptr1, uint8_t bytes){

        int i=0;
        unsigned char* ptr = ptr1;

        for(i=0; i< bytes; i++){
                printf(" %x ", *ptr);


int main(){

        double   myDouble = 2.048;
        int k=0;

        printf(" myDouble: %f myDouble: %llx myDouble:",myDouble,myDouble);
        printBytes((unsigned char*)&myDouble, sizeof(double));


I buit this against a known VFP, a known FPA and the old
toolchain(which I don't know what it is).  I built both dynamically
and statically.

I then ran it against the new kernel which was FPA and against the old kernel.

I got incorrect answers for printf %f when
I ran VFP dynamically linked code on the new FPA kernel
I ran FPA dynamically linked code on the old unknown kernel
I ran unknown (from the old tool chain) dynamically linked code  on
the new kernel

all other printf's were as expected for their respective FPA/VFP settings.

This leads me to conclude that the old toolchain was VFP.

The question I have for everyone listening is .... any suggestion on
which way to go?  VFP/FPA?

Thank you so much for the help Khem!


More information about the uClibc mailing list