lua-users home
lua-l archive

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


On Sun, Aug 9, 2009 at 5:03 PM, Mike Pall<mikelu-0908@mike.de> wrote:
[...]
> Michael Bauroth wrote:
>> Does there exist eventually an ARM port?
>
> Given the market share and the estimated demand, that's most
> likely the next port after the x64 port. But it's much more
> complicated, since there is no uniform ARM platform. The choice of
> the number type for Lua is the main difficulty.
>
[...]

Am I the only one who would be interested in a MIPS port? :)

> Another option is to use 32 bit integers only. Certainly easier to
> implement, but I'm not so sure everyone would be happy with it.
>
> I've also considered using 32.31 fixed-point numbers. Yes, it's a
> bit of an awkward choice. But you'd get fractional numbers at the
> speed of integer arithmetics. Again, I'm not sure about the needs
> of developers who'd like to have LJ2 ported to ARM.

In my experience, Lua with a 32-bit integer core is covering 95+% of
our needs. However, sometimes you just need to represent something
that is larger (file/disk sizes, traffic counters, ...) or you need
non-integer arithmetic. Using userdata in these cases is just awkward.

> [Note that support for multiple number types per platform is not
> an option. A JIT compiler needs to emit very different instruction
> sequences for each number type. Switching number types is not as
> easy as changing a couple of C macros.]

I know next-to-nothing about JIT so the following might sound
ridiculous: would it be possible to combine Asko's LNUM patch with
JIT?

-- 
Dirk