diff options
Diffstat (limited to 'src/ia64/NOTES')
-rw-r--r-- | src/ia64/NOTES | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/ia64/NOTES b/src/ia64/NOTES index e69de29b..fa2e2a80 100644 --- a/src/ia64/NOTES +++ b/src/ia64/NOTES @@ -0,0 +1,62 @@ +- the frame state consists of the following: + + - ip current instruction pointer + - sp current stack pointer value + - bsp current backing store pointer + - cfm current frame mask + + these are derived from the next younger (more deeply nested) frame + as follows: + + - ip == saved return-link (may be b0 or an alternate branch-reg) + - sp == if younger frame has a fixed-sized frame, sp + size-of-frame, + else saved sp + - cfm == saved ar.pfs + - bsp == if ar.bsp has been saved, saved ar.bsp, otherwise, + ar.bsp \ominus saved ar.pfs.pfm.sol + +The unwind cursor should represent the machine state as it existed at +the address contained in register ip. This state consists of the +*current* frame state and the save locations in the next younger +frame. + +An unwind script current takes the old save locations and updates them +for the next older frame. With the new setup, we need to update the +frame state first, without updating the other save locations. For this +to work, we need the following info: + + - save location of return-link + - save location of ar.pfs + - save location of bsp (if it has been saved) + - size of stack frame (fixed case) or save location of sp + + +setup: + + func: ... + ... + ... + br.call foo <-- call site + ... <-- ip + ... + +initial state: + + The unwind cursor represents the (preserved) machine state + as it existed at "ip". + + Evaluating the unwind descriptors for "ip" yields the following + info: + + - frame size at call site (or previous sp) + - what registers where saved where by func before + the call site was reached + + + Problem: there is some procedure info that needs to be obtained + for the new "ip" which is contained in the unwind + descriptors. Specifically, the following is needed: + + - procedure's start address + - personality address + - pointer to language-specific data area |