This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc 3.4.0 20040121 / ia32 / read-write constraint does not allow a register
- From: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 29 Jan 2004 14:14:59 +0100 (CET)
- Subject: gcc 3.4.0 20040121 / ia32 / read-write constraint does not allow a register
Hello,
While testing my current project with this GCC-3.4 snapshot:
[etienne@localhost gujin]$ ../toolchain-3.4/bin/gcc -v
Reading specs from
/home/etienne/projet/toolchain-3.4/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: ../configure --prefix=/home/etienne/projet/toolchain
--enable-languages=c
Thread model: posix
gcc version 3.4.0 20040121 (prerelease)
I get a lot of warnings like:
gmem.h:818: warning: read-write constraint does not allow a register
On asm("") like:
extern inline void fmemcpy (farptr dst, farptr src, unsigned short size)
{
extern char memory[]; /* memory barrier, char not aliased */
asm (
" pushl %%es \n"
" pushl %%esi \n"
" popw %%si \n"
" popw %%fs \n"
" pushl %%edi \n"
" popw %%di \n"
" popw %%es \n"
" cld # fmemcpy modify %3 \n"
" rep movsb %%fs:(%%si),%%es:(%%di) # no macro \n"
" nop \n"
" popl %%es \n"
: "+S" (src), "+D" (dst), "+c" (size), "+m" (*memory)
:
: "cc"
);
}
I do not know if the warning is bogus or I am no more allowed to
write: "+S" (src), "+D" (dst), "+c" (size)
I checked the doc of 3.3:
When the compiler fixes up the operands to satisfy the constraints, it needs
to know which operands are inputs to the instruction and which are outputs
from it. = identifies an output; + identifies an operand that is both input
and output; all other operands are assumed to be input only.
Can someone enlighten me?
Thanks,
Etienne.
Note also that I still have calls to memcpy emitted even when
-Os -march=i386 and -minline-all-stringops while copying relatively big
structures by the equal sign (my inline function memcpy cannot
expand), as discussed last month.
Yahoo! Mail: votre e-mail personnel et gratuit qui vous suit partout !
Créez votre adresse à http://mail.yahoo.fr