This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

Re: GCC 2.8.1 for PowerPC/EABI: interrupt handler



Yaroslav:

Which processor are you using?  For the 603e, here is the minimal code
needed in the interrupt vector to call an EABI handler...

	.org	EVT_EXT_INT
	# Interrupts are disabled at this point.
	
	# create an isr stack frame before calling C function
	stwu	r1,-16(r1)
	stw	r0,12(r1)	# save r0
	mflr	r0
	stw	r0,20(r1)	# save lr
	bl	_int_isr
	# unwind isr stack frame
	lwz	r0,20(r1)	# restore lr
	mtlr	r0
	lwz	r0,12(r1)	# restore r0
	addi	r1,r1,16
	rfi


Yaroslav Domaratski-R35383 <Yaroslav_Domaratski-R35383@email.sps.mot.com> writes:
  > Hello,
  > 
  > Is "interrupt" pragma supported for PowerPC/EABI target in GCC 2.8.1?
  > 
  > It seems like I can not force the compiler to generate prologue/epilogue
  > code (gcc doe not generate anything):
  > 
  > #pagma interrupt
  > void myHandler( void )
  > {
  >  ...
  > }
  > 
  > GCC command line:
  > $ gcc -c -ansi -g -gdwarf -O0 -fno-omit-frame-pointer -mcpu=505
  > -mno-relocatable -meabi -o file.o file.c
  > 
  > If "interrupt" pragma is not supported, then is it possible to use other
  > GCC possibilities instead (like command line options, fnction modifiers,
  > ...)?
  > 
  > Thanks in advance,
  > Yaroslav
  > 
  > 
  > 
  > 
  >