Inline assembler can't return 64-bit values in registers
Alan Modra
alan@linuxcare.com.au
Wed Dec 6 16:45:00 GMT 2000
On Wed, 6 Dec 2000, Timur Tabi wrote:
> which basically assumes that the compiler will use edx:eax as the return value.
> Converting this to gcc appears to be impossible.
Unless you know about the `A' constraint. Try this:
register u64 temp1;
__asm__ __volatile__ (
"movq (%1), %%mm0\n\t"
"movd %%mm0, %%eax\n\t"
"punpckhdq %%mm0, %%mm0\n\t"
"movd %%mm0, %%edx"
: "=A" (temp1)
: "r" (pInput)
);
return temp1;
--
Linuxcare. Support for the Revolution.
More information about the Gcc-bugs
mailing list