This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Clarification Req: Regarding "+m" constraints in inline asm
- From: "Ashok.A" <ashok_kumar_ak at yahoo dot com>
- To: gcc at gcc dot gnu dot org
- Cc: ashok_kumar_ak at yahoo dot com
- Date: Wed, 3 Mar 2004 06:44:17 -0800 (PST)
- Subject: Clarification Req: Regarding "+m" constraints in inline asm
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