lua-users home
lua-l archive

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


Damn, this can only mean different physical representations of
floating point numbers :) Thanks, I'll try to look into it. Or not,
it's not like I can do anything about it even if I do find the
problem. Maybe playing with the compiler's ARM specific floating point
options will help.

Thanks,
Bogdan

On Wed, Aug 27, 2008 at 11:55 PM, Mike Crowe <drmikecrowe@gmail.com> wrote:
> I had an issue with literals in my code.  For instance:
>
> i = 1
>
> would not work.
>
> i = tonumber("1")
>
> worked fine.
>
> On Wed, Aug 27, 2008 at 4:36 PM, steve donovan <steve.j.donovan@gmail.com>
> wrote:
>>
>> Double on ARMs can be very weird - we hit this problem!
>>
>> steve d.
>>
>> On 8/27/08, Bogdan Marinescu <bogdan.marinescu@gmail.com> wrote:
>> > Hi list,
>> >
>> > I'm trying to compile a Lua source file on the PC (with the standard
>> > luac compiler, I'm not using the cross-compile patch that was posted
>> > on this list a while ago ) and then run the compiled bytecode on my
>> > ARM boards. Keep in mind that:
>> >
>> > - i386 and ARM are both little endian
>> > - and 32 bits (as I'm using the 32-bit mode on my dual core CPU).
>> > - and the data types are the same
>> > This almost works. Almost, as in "some parts of the code work, and
>> > some don't, and I can't find a pattern for this". Lua does NOT return
>> > an error on the compiled work, it just doesn't execute it properly. Of
>> > course, the source code works all the time.
>> > So what's left? Maybe the floating point data types have different
>> > representations and/or semantics? I'm not really using floating point,
>> > but the Lua's number type is the default (double), so everything works
>> > in double. I'm using GCC for ARM to compile my code, without any
>> > specific options for floating point code generation.
>> >
>> > Thanks,
>> > Bogdan
>> >
>
>