GCC inline assembler question
- From: Fred Nach <fred_nach@xxxxxxxxxxx>
- Date: Wed, 05 Oct 2005 17:20:36 +0200
Hi all !
I'm wondering how can i use "dummy registers" inside an inline assembly part ?
I mean, considering this code :
asm("mov r1, %1, asr #15;" "teq r1, %1, asr #31;" "eorne %0, %1, %1, asr #31;" :"=r" (output) :"r" (input) :"r1" );
In this case, r1 is used only locally, and it is also clobbered, hence gcc will store its value (somewhere in the stack, memory, or other free register) before using it...
I would like to know how to let gcc determine the best register to use (for exemple if before that asm instrcution r6 is free... it leads to less store/load instructions).
Hard to explain but how can i specify to gcc that i want to use not specific register ... and let him decide the best to use ?
Thanks in advance for any help !!
- Prev by Date: Re: ARM7TDMI(-S) abort help?
- Next by Date: Re: GCC inline assembler question
- Previous by thread: Newbie question: XScale graphics
- Next by thread: Re: GCC inline assembler question