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

Mike Hommey mh at glandium.org
Mon Aug 27 05:13:25 UTC 2007


On Sun, Aug 26, 2007 at 09:18:20PM +0300, Riku Voipio <riku.voipio at iki.fi> wrote:
> 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.

Ah ok, I now understand better what you were saying initially.

> > 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.

Well, there should still be something to test if we're being little or
big endian. Sure, we don't have an armeb port (yet), but I think it
would be better to have this fixed once and for all.

Mike



More information about the Pkg-webkit-maintainers mailing list