lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, 11 Aug 2008, Tim Maxwell wrote:
>
> This code assumes that 'float' is a standard 32-bit float and 'double' is a
> standard 64-bit double. It will trip a lua_assert if lua_Number is not integer
> but sizeof(lua_Number) is not 32 or 64. Is that portable enough?

Older ARMs that use the FPA instructions store doubles with the most
significant word at the lower address even when running in little-endian
mode (i.e. they are middle-endian). In more recent VFP ARMs the word order
of doubles follows the machine's endianness.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
FAIR ISLE FAEROES: EASTERLY 4 BACKING NORTHERLY 5 TO 7. MODERATE OR ROUGH.
OCCASIONAL RAIN. MODERATE OR GOOD.