This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
2.95.2 [Re: 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:48:39 +0400
- Subject: 2.95.2 [Re: asm() usage: how to get rid of a gas warning (i386)?]
- Organization: Yandex
Sorry, I forgot to tell it's gcc 2.95.2
> 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
>
>