Clarification Req: Regarding "+m" constraints in inline asm
Jim Wilson
wilson@specifixinc.com
Thu Mar 4 20:45:00 GMT 2004
Ashok.A wrote:
> I need clarification regarding the "+m" constraints.
> I heard that "+m" constraints cannot be used
> in "inline asm". Is it true?
Current sources will give a warning for both of your examples. Neither
read-write "+" or matching "1" constraints should be used with mems in
an asm. These both require that the operands are the same, but the
compiler is not able to guarantee this for mems. We can only make this
work for register constraints.
Try changing the lw to use %2 instead of %1, and then use "m" for the
second operand. I think this is the way it is supposed to work nowadays.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list