[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 15:10:42 +0200 |
Mostly to Iztok ?! (sorry others)
Plase read excatly what I have written:
"The returning from the interrupt is managed by me. We misunderstood here."
Who said I want return where I entered the interrupt ???
> If the return from interrupt has to be mingled with, just pop it from
stack
> and push another address there (Like the old PDP11/RSX11 used to do).
This is excatly what I don't want to do ? Why ? Time, precious time, my
friend !!
Don't worry I know how this AVR works and perhaps many other processors.....
Regards,
Marko Panger
----- Original Message -----
From: "Iztok Zupet" <address@hidden>
To: "Marko Panger AGB Lab" <address@hidden>; "Joerg Wunsch"
<address@hidden>
Cc: "Avr-Gcc List" <address@hidden>
Sent: Tuesday, June 17, 2003 2:54 PM
Subject: Re: [avr-gcc-list] 2 tricky questions
> On Tuesday 17 June 2003 13:33, Marko Panger AGB Lab wrote:
> > > #define dosomething asm volatile("do something")
>
> I normally use the above trick, like:
> #define high(x) \
> ({unsigned char t; asm volatile ("lds %0, (%1+1)" :"=r"(t) :"m"(x));
t;})
>
> >
> > By the "user point of view" calling an inline function is the same as
> > calling a normal function. The syntax is the same. In fact I was looking
> > for this. What does the compiler is another issue. I wanted the syntax
of a
> > normal function, but implemented as a macro - inline functions.
> >
> > > > The best soultion would be to replace the interrupt pro/epi
> > > > functions with my functions or to call an assembler defined macro.
> > >
> > > By default, they aren't functions but are generated explicitly within
> > > each function. Are you using -mcall-prologues? Then you're getting
> > > them as functions.
> >
> > Off course, pro/epi sequences aren't functions. I want to change these
> > sequences (use mine), but only for interrupts, not for normal functions.
> > So, is it possible to do this ?
> >
> > > For normal prologue /functions/, yes, they are really getting their
> > > return addresses pushed onto the stack. How else is the function
> > > supposed to return to the caller? You probably don't want a function
> > > for this, but your wording is a bit ambiguous here, sorry.
> >
> > The returning from the interrupt is managed by me. We misunderstood
here.
> >
>
>
> BTW, the PROCESSOR iself pushes the return addres to stack when
interrupted
> not the GCC!!! That's why it's there in a _naked_ function.
>
> If the return from interrupt has to be mingled with, just pop it from
stack
> and push another address there (Like the old PDP11/RSX11 used to do).
>
> Iztok
>
- [avr-gcc-list] 2 tricky questions, Marko Panger AGB Lab, 2003/06/17
- Re: [avr-gcc-list] 2 tricky questions, Tvrtko A. Uršulin, 2003/06/17
- Re: [avr-gcc-list] 2 tricky questions, Joerg Wunsch, 2003/06/17
- Re: [avr-gcc-list] 2 tricky questions, Marko Panger AGB Lab, 2003/06/17
- Re: [avr-gcc-list] 2 tricky questions, Joerg Wunsch, 2003/06/17
- Re: [avr-gcc-list] 2 tricky questions, Marko Panger AGB Lab, 2003/06/17
- Re: [avr-gcc-list] 2 tricky questions, Iztok Zupet, 2003/06/17
- Re: [avr-gcc-list] 2 tricky questions,
Marko Panger AGB Lab <=
- Re: [avr-gcc-list] 2 tricky questions, Joerg Wunsch, 2003/06/17
- Re: [avr-gcc-list] 2 tricky questions, Marko Panger AGB Lab, 2003/06/17
- Re: [avr-gcc-list] 2 tricky questions, Joerg Wunsch, 2003/06/17
- Re: [avr-gcc-list] 2 tricky questions, Kang Tin LAI, 2003/06/17
- Re: [avr-gcc-list] 2 tricky questions, Christian Vogel, 2003/06/18
- Re: [avr-gcc-list] 2 tricky questions, Joerg Wunsch, 2003/06/17
Re: [avr-gcc-list] 2 tricky questions, Julius Luukko, 2003/06/17