English
Language : 

GMS30C2216 Datasheet, PDF (115/320 Pages) Hynix Semiconductor – 16/32 BIT RISC/DSP
Exceptions
4-5
The stack address of a local register denoted by a backtracked instruction can be calculated
according to the following formula:
stack address of preceding stack frame := stack address of
current stack frame - (((FP - saved FP) modulo 64) * 4);
-- bits 5..0 of the difference (FP - saved FP) are used zero-expanded
-- * 4 converts word difference ⇒ byte difference
-- the stack address of the current stack frame is provided by the
Set Stack Address instruction
stack address of local register := stack address of preceding
stack frame + (local register address code * 4);
-- * 4 converts local register word offset ⇒ byte offset
Note: Backtracking allows a much more detailed analysis of error causes than a more
differentiated trapping could provide. Exception handlers can get more information about
error causes and the precise messages required by most programming languages can be
easily generated.