m68k & Interrupts

Michael Schwingen rincewind@tubul.dascon.de
Thu Sep 17 09:24:00 GMT 1998


On Mon, Sep 14, 1998 at 08:47:24AM -0700, Art Berggreen wrote:
> Unless GCC is extended to add an "interrupt" attribute to function
> typing, I believe that a small bit of assembler to save volatile
> registers, jsr to a C function, then restore registers and execute
> an RTE is the cleanest way to go.

The 'interrupt' attribute would be very welcome here, too. The problem with
the asm wrapper is that it produces double overhead:
 - one function call level
 - double movem, since the asm saves d0-d1/a0-a1, and the compiler will
   probably produce code to save other registers which it needs.

Normally, this would not seem too bad, but I think in an ISR this is
definitely out of place.

Any idea how to implement this the right way?

cu
Michael
-- 
Michael Schwingen, Ahornstrasse 36, 52074 Aachen



More information about the crossgcc mailing list