RFC: new RTEMS IRQ requirements

Valette Eric eric.valette at free.fr
Thu Feb 20 22:41:10 UTC 2003


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

------------------ 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









More information about the users mailing list