Inline assembly help

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

 



Hi,

Trying to compile the following inline asm statement:

        asm("fmull %[twopi]\n\t" 		\
	    "fsincos\n\t" 			\
	    "fadd	%%st(0), %%st(0) \n\t" 	\
	    "fxch \n\t"				\
	    "fadd	%%st(0), %%st(0)\n\t"	\
	    "fxch	%%st(2) \n\t" 		\
	    "fld1 \n\t" 			\
	    "fsub	%%st(1), %%st(0) \n\t" 	\
	    "fld	%%st(1) \n\t" 		\
	    "fmul	%%st(1), %%st(0) \n\t" 	\
	    "fsqrt \n\t" 			\
	    "fmul	%%st(0), %%st(3) \n\t" 	\
	    "fmulp	%%st(0), %%st(4) \n\t"	\
	    "fsub	%%st(1), %%st(0) \n\t" 	\
	    "fstpl	%[zt] \n\t" 		\
	    "fstp	%%st(0) \n\t" 		\
	    "fstpl	%[xt] \n\t" 		\
	    "fstpl	%[yt]" 			\
	    :[xt] "=m" (x),			\
	     [yt] "=m" (y),			\
	     [zt] "=m" (z)  			\
	    :[twopi] "F" (2*M_PI), 		\
	     "t" (drand48()), 			\
	     "u" (drand48()));

g++ errors with:

/tmp/cc7QJhi7.s: Assembler messages:
/tmp/cc7QJhi7.s:29: Error: junk `.28318530717958623199593e+0' after
expression
make: *** [light.o] Error 1

The .2831... is obviously the last part of 2*M_PI, so it seems to think
it's a integer imm?

Many thanks,
James


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux