This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
asm() usage: how to get rid of a gas warning (i386)?
- From: "Alexander Melkov" <melkov at comptek dot ru>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 5 Jun 2003 20:45:04 +0400
- Subject: asm() usage: how to get rid of a gas warning (i386)?
- Organization: Yandex
Hello!
I have a portion of code with inline asm() inctructions compiled by gcc. Sometimes it causes gas to
issue a warning:
"Warning: missing operand; zero assumed"
This is due to the following line of code (unnecessary part or asm code is omitted).
asm (...
"adcl %3,4+%1; \n"
: "=c" (Cur), "=o" (Sum), "=&a" (_eax), "=&d" (_edx)
: "0" (Cur), "1" (Sum)
: "cc");
That instruction is sometimes converted into correct instruction, something like
adcl %edx,4+48(%esi)
- and sometimes I get
adcl %edx,4+(%ebx)
- which causes the above warning.
Is the constraint "=o" right? I'm just accessing i64-type variable Sum by it's address.
Best Regards, Alexander Melkov