lua-users home
lua-l archive

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


Edgar Toernig wrote:

> I think you got the wrong system if you really want to get rid of
> all longs ;-)  These systems are made to deal with large files and
> memory.  That's why they have 64 bit longs.

Umm... the reason the machine has 64 bit longs is because the CPU has a mips
III core.  It only has 32MB of memory (with no virtual memory) and a CD ROM
device.  (It's called a PS2.)  If I did the compiler implementation for the
platform, maybe I would have made long's 32 bit and used long long for 64
bits, but some things are outside of one's control.

Not using longs is a requirement of my project... it's not open for debate.
(Projects often have rules like you can't use this or do that.  It's not
strange is it?)  Either the Lua implementation can make it easy for me to
meet that requirement, or I'll take a few hours to go in and modify it as I
have been.

> ??? And how is this "vector" used in C?  Are there really people making
> long long 128 bit and then even force a 128 bit alignment?

Yes there really is a 128-bit machine vector type and it really has to be
aligned.  C just let's you pass them around, and inline assembly is required
to do anything useful with them.  With C++ you can wrap them in concrete
types and with some inline assembly member functions it's possible to have a
lot of fun and be type safe too.

-John