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

RFC: new RTEMS IRQ requirements




Valette Eric wrote:
> 
> Joel Sherrill wrote:
> 
> > I wouldn't mind seeing the implementation either call the PIC vectoring
> > code as a subroutine or be broken into "prologue" and "epilogue" files
> > which
> > are concatenated with a "PIC vectoring" file to do the BSP/PIC specific
> > dirty work.
> >
> > I know it is an implementation detail but I don't like duplication and
> > I especially don't like duplicating code like the ISR handling code.
> > I am sure Till is tired of looking at all the various versions of the
> > same PPC assembly code by now. :)
> 
> May I suggest to use m4 macros instead of cpp

Speaking strictly from a historical perspective.  RTEMS used to make 
more use of m4 and it was a portability pain in the (*&^%#.  THe
situation may be better now but I somehow doubt it.  

I recall that the original i386 port did use m4 to generate this code
but I can't find it in CVS since CVS ONLY goes back to 1995. :)

> ------------------ sample ---------------------
> 
> define(INTR_BASE_NUMBER, 192)
> 
> define(`INTR_ENTER',`
>         /
>         / save scratch registers
>         /
>         pushl   %eax
>         pushl   %ecx
>         pushl   %edx
> 
>         movl    $ $1 + INTR_BASE_NUMBER, %ecx
> ')
> 
> ENTRY(irq0)
>         INTR_ENTER(0)
>         jmp common;
> 
> --
>     __
>    /  `                         Eric Valette
>   /--   __  o _.                6 rue Paul Le Flem
> (___, / (_(_(__                 35740 Pace
> 
> Tel: +33 (0)2 99 85 26 76       Fax: +33 (0)2 99 85 26 76
> E-mail: eric.valette at free.fr

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985