[Icc-430] Compiler's interrupt handler wrapper preserves R8 and R9...?

Kris Heidenstrom kris at abbey.co.nz
Wed Nov 29 12:34:20 PST 2006


Hi,

The compiler-generated interrupt handler wrapper
code preserves R8 and R9 as well as R10~15.
(I'm using version 7.03.) I don't think it should.
>From "Assembly Interface and Calling
Conventions" in the online help:

Preserved Registers R4~9
These registers are called preserved registers,
since their contents are unchanged by a function
call. Local variables are assigned to these registers
by the compiler.

Volatile Registers R10~15
Can be used in a function without being saved or
restored. These registers are called volatile registers,
since their contents may be changed by a function
call.

Interrupt Handlers

If you write a handler in assembly and if it calls
normal C functions, then the assembly handler
must save and restore the volatile registers,
since normal C functions do not preserve them.

Am I missing something here?

Kris
--
Kris Heidenstrom         Embedded systems designer / programmer
kris at abbey.co.nz         Abbey Systems Ltd - Telemetry Specialists
Wellington NEW ZEALAND   Voice +64-4-385-6611  Fax +64-4-385-6848



More information about the Icc-430 mailing list