[Top][All Lists]

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

Re: [avr-gcc-list] 2 tricky questions

From: Marko Panger AGB Lab
Subject: Re: [avr-gcc-list] 2 tricky questions
Date: Tue, 17 Jun 2003 11:38:28 +0200

I will try to clarify:

1) In fact I would like to call a macro defined in assembler

2) The trick with naked attribute should work, but calling "myIntEnter"
function puts the return addres onto the stack which is not excatly what I
want. I should call an inline function, but as I read there are some
troubles with inline functions in GCC. The best soultion would be to replace
the interrupt pro/epi functions with my functions or to call an assembler
defined macro.

3) I also tried to define a static inline function and it worked until the
function had about 20 instructions, when I have passed this limit the
compiler called the function as a normal function. (the limit is not
excatly, I have to check again)


----- Original Message -----
From: "Joerg Wunsch" <address@hidden>
To: <address@hidden>
Sent: Tuesday, June 17, 2003 10:56 AM
Subject: Re: [avr-gcc-list] 2 tricky questions

> "Marko Panger AGB Lab" <address@hidden> wrote:
> > 1) Is there a way to define an inline function declared in a assembler
> > source ?
> Sorry, i can't follow you.  ``inline function'' is something the
> compiler expands similar to a macro, but syntactically a function.  So
> this per se cannot be assembler since it's handled by the compiler.
> Do you want to write a function in an assembler file, and call it from
> C?  Of course, that's possible.
> > 2) Is it possible to link user defined (my) interrupt prologue and
> > epilogue functions instead of the integrated ones ?
> You can declare the function as __attribute__((naked)) which will make
> the compiler emit no prologue and epilogue at all.  Then plug in your
> own {pro,epi}logue, supposedly using some inline asm magic.
> --
> J"org Wunsch        Unix support engineer
> address@hidden
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]