[PATCH] Funky floats and struct packing are a oldabi arm issue,

Riku Voipio riku.voipio at iki.fi
Sun Aug 26 18:18:20 UTC 2007


On Sun, Aug 26, 2007 at 06:11:28PM +0200, Mike Hommey wrote:
> On Sun, Aug 26, 2007 at 06:27:13PM +0300, Riku Voipio <riku.voipio at iki.fi> wrote:
> > so lets not break arm eabi builds (Debian port armel). WTF_PLATFORM_MIDDLE_ENDIAN
> > is definetly old-abi specific, but the header does not explain where the
> > struct packing is set. if it's WTF_PLATFORM_ARM, it's wrong. It should
> > be WTF_PLATFORM_PACK_STRUCTS. Anyway packing already packed stuff is
> > harmless(?).

> PACK_STRUCT is only defined in JavaScriptCore/kjs/ustring.h and
> WebCore/platform/DeprecatedString.h, and only for PLATFORM(ARM) (with
> a gcc compiler)
> In both files, it is used to have a struct { short x ; } be 2 bytes
> instead of 4, which is harmless.

So it's assuming arm + gcc means explict packing is needed. It is not
true for arm eabi, which has same struct packing rules than the rest
architectures.

> The only place PLATFORM(MIDDLE_ENDIAN) test is used is
> JavaScriptCore/kjs/fpconst.cpp, to set NaN et Inf.
> Anyways. I might be wrong, but are you sure ! __ARM_EABI__ is enough to
> tell whether we are little endian or not ?

It's not really about being little/big endian. It's about oldabi arm
using a different FPU instruction set than eabi. The middle-endian
floats are a old-abi specific quirk.

-- 
"rm -rf" only sounds scary if you don't have backups



More information about the Pkg-webkit-maintainers mailing list