Re: Special instructions in inline assembler

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

 



Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de> wrote:

> You can declare two fixed registers with something like
>
> register uint32_t r2 asm("r2");
> register uint32_t r3 asm("r3");
>
> and use them. Of course this will not be as efficient as if the
> compiler were to chose them itself, but at least you need no copying.

Falk,

Thanks so much for your suggestion. I think this is sufficiently useful that someone ought to add it to one of the inline assembler FAQ's. Several other GCC hackers I asked hadn't seen this way of nailing down the registers.

Best,
Derek Roberts

[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