public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Clarification Req: Regarding "+m" constraints in inline asm
@ 2004-03-03 14:44 Ashok.A
  2004-03-04 20:45 ` Jim Wilson
  0 siblings, 1 reply; 9+ messages in thread
From: Ashok.A @ 2004-03-03 14:44 UTC (permalink / raw)
  To: gcc; +Cc: ashok_kumar_ak

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 911 bytes --]

Hi All,

I need clarification regarding the "+m" constraints.
I heard that "+m" constraints cannot be used
in "inline asm". Is it true?

Example:

----------
  int temp;
  asm ("lw %0,%1     \n\t"
       "addu %0,%0,1 \n\t"
       "sw %0,%1"
       : "=r" (temp), "=m" (data)  /* outputs */
       : "1" (data));              /* inputs  */
----------

  Can I use the following instead of the above?
  Will it be exactly same as above?

----------
  int temp;
  asm ("lw %0,%1     \n\t"
       "addu %0,%0,1 \n\t"
       "sw %0,%1"
       : "=r" (temp), "+m" (data)  /* outputs */
----------

I believe "+m" constraint is processor independent.
Anyhow, I need clarification for MIPS processor.

It would be great help if you can clarify this
issue. Thanks in advance.

Thanks,
Ashok

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-03-31  7:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-03 14:44 Clarification Req: Regarding "+m" constraints in inline asm Ashok.A
2004-03-04 20:45 ` Jim Wilson
2004-03-26 13:34   ` Clarification Req: Regarding "memory" clobber for cache operation is required (?) Ashok.A
2004-03-27 19:54     ` Ashok.A
2004-03-30  0:38     ` Jim Wilson
2004-03-30 21:26       ` Ashok.A
2004-03-30 22:02         ` Paul Koning
2004-03-31  9:40           ` Ashok.A
2004-03-31  1:45       ` Richard Henderson

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).