[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] optional SRB




Hi,

> How did you start to save your register ? You need a target address that you 
> must first put in a register to save your registers, so you always lost at 
> least one register... Puting the PC in the SR is not needed. If you want it, 
> use loopentry. If you want to modify it use jmp. No need to complexify the SR 
> unit for something like that.

My previous email (18:45) was just addressing that ;)

Note : you *cannot* use "jmp" or "loopentry" to return from an interrupt
handler. You can't use any instruction that would use a general-purpose
register. The interrupted task does not know it has been interrupted,
so you must restore the whole of the register set when you return. Thus
the return address cannot be taken from a general-purpose register.
It can however be taken from a SR, because SRs are not meant to be
used by ordinary code.



*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/