lua-users home
lua-l archive

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

> The whole assembler code in Lua 5.0 is:
>     #ifdef USE_FASTROUND
>     #define lua_number2int(i,d)	__asm__("fldl %1\nfistpl
> %0":"=m"(i):"m"(d))
>     #endif
> ... and it is completely optional. The default is:
>     #define lua_number2int(i,n)	((i)=(int)(n))
> I doubt that you can base a thesis on porting this to ARM 64. Some
> similiar code is also included in newer versions of Lua, btw.

Moreover, keep in mind that this optimization is there because of the
peculiarities of how x86 does the default conversion in C. For
different architectures the whole motivation for this optimization
can be void.

-- Roberto