Re: Assembler corrupting input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"tom@xxxxxxxxxx" <tom@xxxxxxxxxx> writes:

> The problem is that the values of both 'rounds' and 'wurzel' are zero 
> at the end of the call.  How do I tell the machine that the register 
> called '[rounds]' will be changed by the assembler section, and so that 
> it can't just use the name that 'wurzel' happened to be stored in at 
> the time?

You have to make it an output and an early clobber.  Easiest way is
probably to do something like this in the output section:
   [rounds] "=&r" (dummy)
and something like this in the input section:
   "0" (wurzel)
where "0" is the index of the operand, so this would be right if
[rounds] were the first output operand.

Actually I see that your asm has no output operands at all, which is
odd.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux