This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 3.4.0 20040121 / ia32 / read-write constraint does not allow a register
- From: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- To: Andrew Haley <aph at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 30 Jan 2004 10:44:25 +0100 (CET)
- Subject: 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