Mail Archives: djgpp/1998/08/22/22:58:54
Nate Eldredge wrote:
> > Is there any way to load a variable into a register without putting it
> > in the 'input registers' section?
> Yes, just as you describe.
int main(){
int T=9;
asm("movl T, %eax");
}
How can I make that program compile. How can I load 'T' into %eax without
using input registers.
> > int add(int a, int b)
> > {
> > int Ret;
> > asm ("movl ?a?, %%eax;"
> > "addl ?b?, %%eax;"
> > : : "=a" (Ret): "%eax");
> > return Ret;
> >
> > Do I have to tell it I killed eax when it was used as an output
> > register?
>
> No. You may need to add `&' to the constraint, however, so it doesn't
> put any input operands there.
Could you give me an example of what you mean?
--
(\/) Endlisnis (\/)
s257m AT unb DOT ca
Endlisnis AT GeoCities DOT com
Endlis AT nbnet DOT nb DOT ca
- Raw text -