egcs-980205/sh-coff #pragma interrupt
Ralf Corsepius
corsepiu@faw.uni-ulm.de
Tue Feb 17 08:59:00 GMT 1998
Hi,
#pragma interrupt handling seems to be broken for sh-coff with
optimization levels greater than -O2.
When having more than one interrupt service routine in a file and using
optimization levels greater than -O2, only the first interrupt handling
routine is handled correctly by egcs. Subsequent #pragma interrupt
functions are treated as normal functions and not as interrupt service
routines.
To reproduce compile the file below with sh-coff-gcc -O[>2] and have a
look at the resulting asm-instructions.
Ralf
---- snip ----
extern void callit0( int );
extern void callit1( int );
#pragma interrupt
void foo0_isr( void )
{
callit0( 1 );
}
#pragma interrupt
void foo1_isr( void )
{
callit1( 1 );
}
More information about the Gcc-bugs
mailing list