This is the mail archive of the
mailing list for the GCC project.
Re: gcc 3.4.0 20040121 / ia32 / read-write constraint does not allow a register
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: etienne_lorrain at yahoo dot fr (Etienne Lorrain)
- Cc: aph at redhat dot com (Andrew Haley), gcc at gcc dot gnu dot org
- Date: Fri, 30 Jan 2004 14:23:32 +0000 (GMT)
- Subject: Re: gcc 3.4.0 20040121 / ia32 / read-write constraint does not allow a register
> ... extern char mem; ... asm ("..."
> : "+S" (src), "+D" (dst), "+c" (size)
> : "m" (*mem) /* unused param */
> : "cc", "memory" /* modify memory */
This pattern will suppress some more optimizations, since the compiler
is told that unspecified memory locations are altered.
Thus, even if it knows that some other memory reference doesn't alias
mem, it will avoid moving that reference across the asm.