This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Wrong inline assembler code generation (IMulL)
- To: "Skvarenina Peter - 5ZA51/9" <skvaren at fred dot fri dot utc dot sk>
- Subject: Re: Wrong inline assembler code generation (IMulL)
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 12 May 2000 09:16:49 -0300
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: Cygnus Solutions, a Red Hat Company
- References: <200005121211.OAA16426@fred.fri.utc.sk>
On May 12, 2000, "Skvarenina Peter - 5ZA51/9" <skvaren@fred.fri.utc.sk> wrote:
> : "=a" (Result), "=d" (temp)
> IMulL %ESI, %EAX // This will change EDX -> EDX:EAX = result of IMUL
> IDiv %EDX, %EAX // Wrong divide
> Did I something wrong ?
Yup. Mark the `d' output operand as earlyclobber (`&') so that it
won't be used for input operands.
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me