Brad Roberts wrote:
On Thu, 11 Jun 2009, Frits van Bommel wrote:
Note that for LDC, an even more optimal arrangement is something like[1]:
-
version(LDC)
import ldc.llvmasm;
creal expi(real y) {
return __asm!(creal)("fsincos", "={st(0)},={st(1)},0", y);
}
-
My appologies if I
On Thu, 11 Jun 2009, Frits van Bommel wrote:
> bearophile wrote:
> > creal expi(real y) {
> > version (LDC) pragma(allow_inline);
> > asm { fld y;
> > fsincos;
> > fxch ST(1), ST(0);
> > }
> > // add code here if asm isn't allowed
>
bearophile wrote:
While implementing some code I have seen that LDC (that uses Tango) isn't able
to inline the code of expi, that is little more than a fsincos asm instruction.
LDC is now able to inline sqrt, etc (that increases their efficiency a lot),
but expi contains asm, and such function
bearophile wrote:
While implementing some code I have seen that LDC (that uses Tango) isn't able
to inline the code of expi, that is little more than a fsincos asm instruction.
LDC is now able to inline sqrt, etc (that increases their efficiency a lot),
but expi contains asm, and such function