public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* asm load/store
@ 2002-08-02 15:34 Dale Johannesen
  0 siblings, 0 replies; only message in thread
From: Dale Johannesen @ 2002-08-02 15:34 UTC (permalink / raw)
  To: gcc-help

Is it true that an asm() that is actually a load or store, and
for which it's impossible to figure out exactly which memory it
touches by examining the arguments, must be declared "volatile"
to work correctly?  It would be nice to have something that
doesn't disable the optimizer so completely yet gets the semantics
right.  I suppose the declaration to clobber "memory" started out
as an attempt to model a store, but it doesn't work, and from the
current docs is apparently not expected to work:

asm (clobbers memory)
store (non-asm)
asm (clobbers memory, identical to above)

cse removes the 2nd asm (sharing it with the first).  If it
thought that clobbering memory==store, it could not do that.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-02 22:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-02 15:34 asm load/store Dale Johannesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).