summaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-08 12:39:14 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-08 12:39:14 +0000
commit01cf4a927264a5034136b5f35608a01e6db79da5 (patch)
tree5633471312e67fc3cf0bea109b8100e267d5654e /gcc/libgcc2.c
parent2d63c1e2bab0a4566a3fac723b9f2ad8aeb17abb (diff)
downloadgcc-01cf4a927264a5034136b5f35608a01e6db79da5.tar.gz
improve comments
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39537 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 34b4cccc52f..9e7aa99ae94 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -3886,9 +3886,9 @@ next_stack_level (void *pc, frame_state *udata, frame_state *caller_udata,
return 0;
/* Now go back to our caller's stack frame. If our caller's CFA was
- saved in a register in this stack frame or a previous one,
- restore it; otherwise, assume CFA register was saved in SP and
- restore it to our CFA value. */
+ saved in a register in this stack frame or a previous one, restore it;
+ otherwise, assume CFA register is SP and restore it to our CFA value
+ (which is defined to be the value of SP in the caller's frame). */
p = saved_regs->reg[caller_udata->cfa_reg];
if (p)
@@ -4107,7 +4107,12 @@ label:
On the SPARC, this means flushing the register windows. */
__builtin_unwind_init ();
- /* Now reset pc to the right throw point. */
+ /* Now reset pc to the right throw point. The return address points to
+ the instruction after the call to __throw; we subtract 1 so that pc
+ points into the call insn itself. Since we work with PC ranges (as
+ opposed to specific call sites), it isn't important for it to point to
+ the very beginning of the call insn, and making it do so would be
+ hard on targets with variable length call insns. */
pc = __builtin_extract_return_addr (__builtin_return_address (0)) - 1;
handler = throw_helper (eh, pc, my_udata, &offset);
@@ -4157,7 +4162,12 @@ label:
On the SPARC, this means flushing the register windows. */
__builtin_unwind_init ();
- /* Now reset pc to the right throw point. */
+ /* Now reset pc to the right throw point. The return address points to
+ the instruction after the call to __throw; we subtract 1 so that pc
+ points into the call insn itself. Since we work with PC ranges (as
+ opposed to specific call sites), it isn't important for it to point to
+ the very beginning of the call insn, and making it do so would be
+ hard on targets with variable length call insns. */
pc = __builtin_extract_return_addr (__builtin_return_address (0)) - 1;
handler = throw_helper (eh, pc, my_udata, &offset);