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


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