This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: GNU AS inline question
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Rich DAddio <richdaddio at sandvideo dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 7 May 2003 15:11:09 -0400
- Subject: Re: GNU AS inline question
- References: <ECENKMEOAEJLMFKPOFMMCEJFCAAA.richdaddio@sandvideo.com>
You probably want to look at the GCC manual, which has a chapter on
inline assembly. You can do the same thing, but the syntax will be a
little different. At a guess, probably something like:
asm ("st %%mp, %0" : "=m" (storeIt));
On Wed, May 07, 2003 at 02:54:34PM -0400, Rich DAddio wrote:
> I am doing an os port along with a migration to gcc on a basic RISC. And I
> am not quite sure if this is the right list for this question so upfront
> apologies it this is not appropriate.
>
> Inside one of the low-level init routines is a function and a piece of
> inline assembly for a proprietary compiler assembler:
>
> int storeIt;
> void theInitCFunction()
> {
> //inline assembly
> _AS("st %mp, [storeIt]");
> }
>
> Which stashes the value of mp.
>
> Is there an easy way to do the same thing inline with gcc/as?? Do I have to
> use extensions?
>
>
> Thanks,
>
> Rich D
>
>
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer