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" == Grant Edwards <grante@visi.com> writes:

Grant> On Wed, Nov 17, 1999 at 09:48:44PM +0100, Jesper Skov wrote:
>> The ARM has some funny layout of doubles in BE mode (or possibly LE
>> mode) where the order of the words are different than the order of
>> the individual bytes. I.e., EFGHABCD or DCBAHGFE... See what I
>> mean?

Grant> At least w/ gcc 2.95.2 the layout is strictly MSB first.

Grant> The problem was that the macro CYG_BYTEORDER in the file
Grant> ecos-snds/install/include/cyg/hal/basetype.h was defined as
Grant> CYG_LSBFIRST and it should be CYG_MSBFIRST.

Grant> This caused the wrong unions to be used for disecting IEEE
Grant> floats and doubles.

Grant> I don't know how that file gets generated, I presume the
Grant> package config processes copied it from
Grant> hal/arm/arch/current/include/basetype.h.

Grant> Apparently there's only the one "basetype.h" file for the arm,
Grant> and there should be two?

Grant> Somehow the pidBE platform package needs to handle this.

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

Bugger!

This is what it should look like - and actually does look like in my
tree. It's a merge oversight. I'll check in the changes right away.

Sorry for the hassle I've caused you.

Jesper

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

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