Hi folks,
I see the Call-Used registers must be saved by the caller (by definition) in avr-libc doc (pag 73). As the caller does not know (does it?) which of these registers shall be needed by the invoked subroutine, it should (?) backup all of them? Is this correct? Cause I've never seen this in the produced assembly.
If not, how does the compiler tell which must be saved and which cannot?
I also have a second question regarding the Registers backup behavior: I've experienced that in at least 2 target architectures, the IRQ always backs up the Program Counter (in the stack). Is this a MUST practice or are there other arch cpus that do not behave this way?
Thanks in advance,
RM