From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27485 invoked by alias); 22 Dec 2004 15:38:19 -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 27298 invoked from network); 22 Dec 2004 15:38:07 -0000 Received: from unknown (HELO mra02.ex.eclipse.net.uk) (212.104.129.89) by sourceware.org with SMTP; 22 Dec 2004 15:38:07 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mra02.ex.eclipse.net.uk (Postfix) with ESMTP id B9FD3406697 for ; Wed, 22 Dec 2004 15:38:06 +0000 (GMT) Received: from mra02.ex.eclipse.net.uk ([127.0.0.1]) by localhost (mra02.ex.eclipse.net.uk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03464-01-12 for ; Wed, 22 Dec 2004 15:38:05 +0000 (GMT) Received: from peter (unknown [82.152.34.67]) by mra02.ex.eclipse.net.uk (Postfix) with ESMTP id CFCA3406678 for ; Wed, 22 Dec 2004 15:38:02 +0000 (GMT) Received: from 192.168.1.4 by peter ([192.168.1.2] running VPOP3) with SMTP for ; Wed, 22 Dec 2004 15:37:59 -0000 Received: from martin ([127.0.0.1]) by [127.0.0.1] with SMTP (SpamPal v1.53) sender ; 22 Dec 2004 15:35:59 +0100 From: "Martin Payne" To: Subject: Inline Assembler for PPC Date: Wed, 22 Dec 2004 15:38:00 -0000 Message-ID: <002e01c4e83b$efb07550$0401a8c0@martin> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Server: VPOP3 V1.5.0a - Registered X-SW-Source: 2004-12/txt/msg00208.txt.bz2 I am trying to do some very simple inline assembler with GCC, compiling on = the Mac (MACOSX). All I would like to do is to store the value of a C function I have just ca= lled into a C variable called "i". So instead of doing: i =3D myfunction(); I want to do something like this: myfunction(); stw r3, i (I know the value of the function is stored into the r3 register.) It might look odd but I have my reasons for doing this. However, for everyt= hing I try with the keyword "asm" for inline assembler, it doesn't compile. All I want to do is put the value in register r3 into my C variable, i. Any ideas? --- Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.766 / Virus Database: 513 - Release Date: 17/09/2004