Re: Inline Assembler for PPC

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

 



"Martin Payne" <martin@xxxxxxxxxxxxxxx> writes:

> All I would like to do is to store the value of a C function I have just called into a C variable called "i".
> 
> So instead of doing:
> 
> i = myfunction();
> 
> I want to do something like this:
> 
> myfunction();
> stw r3, i
> 
> (I know the value of the function is stored into the r3 register.)
> 
> It might look odd but I have my reasons for doing this. However, for everything I try with the keyword "asm" for inline assembler, it doesn't compile.
> 
> All I want to do is put the value in register r3 into my C variable, i.
> 
> Any ideas?

Read
    http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Extended-Asm.html#Extended-Asm

If you have tried that already, then tell us what you did, and in what
way it did not work.

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