lua-users home
lua-l archive

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


(Sorry for top-posting, this stupid phone doesn't let me do it right)

Your emulator will no doubt emulate the endianness of the target, the
idea is that it should work or fail just like the real thing.

If your target is big-endian, your port of Lua is big endian too, both
on the emulator and the target.  Thus, the bytecode compiled with luac
on the PC will have to be byte-swapped at some point.

Wouldn't it be easier to port luac to your target too and run it in
the emulator? The resultant bytecode should run without any further
swapping on both emulator and real hardware




On 10/6/11, Jeff Smith <spammealot1@live.co.uk> wrote:
>
> Hi
>  > > As this is fundamentally still running on a big endian PC.....
> Oops typo, I meant to say Little Endian I compiled the binary using standard
> Luac on PC using Visual Studio 2008. Then ran that on PC target Simulator
> again using VS2008, so it should have worked fine unless the bytecode
> compiler does something silly like encode the absolute address of the print
> function within the binary, but I am pretty sure it wouldnt encode in that
> manner.  I must be missing some other subtlety I believe both VS Studio and
> the Target Compiler (CodeWarrior) are both IEE754 compliant, but I have got
> to get past this first problem before its worth trying on the Target board.
> Regards Geoff
>  		 	   		


-- 
Javier