[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: porting assembly x86 code
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 27 Sep 2013 10:19:25 -0300
> The whole assembler code in Lua 5.0 is:
> #ifdef USE_FASTROUND
> #define lua_number2int(i,d) __asm__("fldl %1\nfistpl
> ... 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.