Mail Archives: djgpp/1998/08/22/16:41:55
Endlisnis 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 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.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -