www.delorie.com/archives/browse.cgi | search |
Xref: | news2.mv.net comp.os.msdos.djgpp:5200 |
From: | Hermann Schinagl <schinagl AT pe DOT avl DOT co DOT at> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Inline ASM and variable |
Date: | Thu, 20 Jun 1996 13:55:32 +0100 |
Organization: | AVL Graz |
Lines: | 15 |
Message-ID: | <31C94A44.3916@pe.avl.co.at> |
References: | <28741 DOT 9606111202 AT ws-ai5 DOT dur DOT ac DOT uk> |
Reply-To: | schinagl AT pe DOT avl DOT co DOT at |
NNTP-Posting-Host: | nmes74.avl.co.at |
Mime-Version: | 1.0 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Sengan DOT Short AT durham DOT ac DOT uk wrote: > > >void foo(int x) { > > > __asm__ __volatile__ (" > > > movl _x, %%eax" > > > : > > > : > > > :"eax" ); > > >} > > I would think that's because your x parameter is not a static location in > memory but a place on the stack, but _x refers to a static location in memory. > (ie if you had static int x; it would work) Thus, gas assembles it wrong. For sure thats the reason. x has to be static. BUT if I want to access local variables, which are *not* global to the program, how do I realise that!!!!
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |