www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - ASM SSE Instruction

reply Chr. Grade <Chr._member pathlink.com> writes:
I would like to know how to tell the compiler to swallow following code:

float rsqrt_sse(float n)
{
asm
{
rsqrtss xmm0, n;
movss n, xmm0;
}

return (n);
}

Thanks in advance.
Chr. Grade
Jun 09 2004
parent "Walter" <newshound digitalmars.com> writes:
xmm0 => XMM0

should do the trick. Registers are all caps in D's assembler.

"Chr. Grade" <Chr._member pathlink.com> wrote in message
news:ca6vat$28cn$1 digitaldaemon.com...
 I would like to know how to tell the compiler to swallow following code:

 float rsqrt_sse(float n)
 {
 asm
 {
 rsqrtss xmm0, n;
 movss n, xmm0;
 }

 return (n);
 }

 Thanks in advance.
 Chr. Grade
Jun 09 2004