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


 --- Andrew Haley <aph@redhat.com> wrote: 
> It's complaining about the in-out memory constraint.  Use this
> instead:
> 
> 	: "+S" (src), "+D" (dst), "+c" (size), "=m" (*memory)
> 	: "m" (*memory)
> 	: "cc"
> 
> Andrew. 

  Thanks, it works fine. Maybe the message of the warning should
 be modified to something more generic like
 "invalid read-write constraint" if nothing else is changed.

  There seem to be people who really understand the code here,
 i.e. who have written it, can they say if the above is 100%
 the same as this extract or there are differences (optimisation
 wise - variable src or dst in stack - variable removed if not
 used...)?

... extern char mem[]; ... asm ("..."  
 	: "+S" (src), "+D" (dst), "+c" (size)
 	: "m" (*mem) /* unused param */
 	: "cc", "memory" /* modify memory */
        )

  Thanks,
  Etienne.


	

	
		
Yahoo! Mail: votre e-mail personnel et gratuit qui vous suit partout ! 
Créez votre adresse à http://mail.yahoo.fr


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