This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc using clobbered register as input with inline assembly
** Reply to message from "Zack Weinberg" <zackw@stanford.edu> on Mon, 26 Mar
2001 10:20:21 -0800
> > According to the documentation, because I specified eax and edx as
> > clobbered registers, gcc should not be using them as inputs or outputs.
> > But that's exactly what's happening in my case.
>
> Clobbers happen *after* the asm completes. You have to do the moves
> separately, or let the compiler do them for you, e.g:
I don't understand this. What good is it to specify clobbers if they happen
after the assembly? I have no control over what happens outside the assembly
code! I thought the point behind clobbers was to inform the compiler of
specific registers that my assembly code modifies.
--
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com
When replying to a mailing-list message, please direct the reply to the mailing list only. Don't send another copy to me.