From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27065 invoked by alias); 18 Apr 2004 18:58:41 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 27057 invoked from network); 18 Apr 2004 18:58:39 -0000 Received: from unknown (HELO hafnium.btinternet.com) (194.73.73.121) by sources.redhat.com with SMTP; 18 Apr 2004 18:58:39 -0000 Received: from [81.154.0.159] (helo=localhost) by hafnium.btinternet.com with esmtp (Exim 3.22 #25) id 1BFHV0-0006Ez-00 for gcc-help@gcc.gnu.org; Sun, 18 Apr 2004 19:58:39 +0100 Subject: Inline assembly help From: James Philbin To: gcc-help@gcc.gnu.org Content-Type: text/plain Message-Id: <1082318405.15695.3.camel@XYZ.mshome.net> Mime-Version: 1.0 Date: Sun, 18 Apr 2004 18:58:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00234.txt.bz2 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