This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


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

Re: sprintf test failure?


Grant Edwards wrote:
> 
> The problem was that the macro CYG_BYTEORDER in the file
> ecos-snds/install/include/cyg/hal/basetype.h was defined as
> CYG_LSBFIRST and it should be CYG_MSBFIRST.
> 
> This caused the wrong unions to be used for disecting IEEE floats and
> doubles.
> 
> I don't know how that file gets generated, I presume the package
> config processes copied it from hal/arm/arch/current/include/basetype.h.
> 
> Apparently there's only the one "basetype.h" file for the arm, and
> there should be two?

No need, see below.
 
> Changing to CYG_MSBFIRST fixed the sprintf errors, and though I
> haven't re-run the libm tests, I expect those will be OK.  But, I'm
> going to go home while I'm ahead, just in case...

Wow. It's a wonder it wasn't found for so long. Now fixed in the master
repository, although I just happened to send out an anonymous CVS update 10
mins ago :-/. The change is obvious though:

#ifdef (__ARMEB__)
# define CYG_BYTEORDER           CYG_MSBFIRST    // Big endian
#else
# define CYG_BYTEORDER           CYG_LSBFIRST    // Little endian
#endif

Jifl
-- 
Cygnus Solutions, 35 Cambridge Place, Cambridge, UK.  Tel: +44 (1223) 728762
"I used to have an open mind but || Get yer free open source RTOS's here...
 my brains kept falling out."    || http://sourceware.cygnus.com/ecos
Help fight spam! http://spam.abuse.net/  These opinions are all my own fault

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