This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Inline assembly and ldm/stm


On 4/11/07, Marius Groeger <mgroeger@sysgo.com> wrote:
I see two solutions to your problem:

1. you can directly specify two suitable registers in the assembler
   part. You then also need to list those registers in the clobber list
   argument of __asm__(). See the gcc info manual, Extended Asm for
   the exact syntax.

2. you can use explicit register variables like this:
   register int r1 asm("r1");
   register int r2 asm("r2");

That's the solution I came to, from a hint on the gcc-help list, see it there: http://gcc.gnu.org/ml/gcc-help/2007-04/msg00104.html

--
Bryce Schober

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]