This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Clarification Req: Regarding "+m" constraints in inline asm


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]