aboutsummaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1997-09-18 23:33:56 +0000
committerJason Merrill <jason@gcc.gnu.org>1997-09-18 19:33:56 -0400
commit6020d3605c14364b52b635a93ef2b93ac39108ba (patch)
tree0c64bd1926558404f2fe6db31186a19420fcc900 /gcc/libgcc2.c
parentfeb5876a0b33803a8ff6a5ba645b1f6f58647b27 (diff)
downloadgcc-6020d3605c14364b52b635a93ef2b93ac39108ba.zip
gcc-6020d3605c14364b52b635a93ef2b93ac39108ba.tar.gz
gcc-6020d3605c14364b52b635a93ef2b93ac39108ba.tar.bz2
final.c (final_scan_insn): Hand BARRIERs off to the dwarf2 code.
* final.c (final_scan_insn): Hand BARRIERs off to the dwarf2 code. * dwarf2out.c (dwarf2out_frame_debug): Pass the whole insn along. (dwarf2out_stack_adjust): A BARRIER resets the args space to 0. * except.c (end_eh_unwinder): Subtract 1 from return address. * libgcc2.c (__throw): Likewise. (find_exception_handler): Don't change PC here. Compare end with >. From-SVN: r15554
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 6b3b7b4..2b9c6bc 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -3337,15 +3337,11 @@ find_exception_handler (void *pc, exception_table *table)
int pos;
int best = -1;
- /* We subtract 1 from PC to avoid hitting the beginning of the next
- region. */
- --pc;
-
/* We can't do a binary search because the table isn't guaranteed
to be sorted from function to function. */
for (pos = 0; table[pos].exception_handler != (void *) -1; ++pos)
{
- if (table[pos].start <= pc && table[pos].end >= pc)
+ if (table[pos].start <= pc && table[pos].end > pc)
{
/* This can apply. Make sure it is at least as small as
the previous best. */
@@ -3354,7 +3350,7 @@ find_exception_handler (void *pc, exception_table *table)
best = pos;
}
/* But it is sorted by starting PC within a function. */
- else if (best && table[pos].start > pc)
+ else if (best >= 0 && table[pos].start > pc)
break;
}
if (best != -1)
@@ -3686,8 +3682,9 @@ label:
break;
}
- /* Otherwise, we continue searching. */
- pc = get_return_addr (udata, sub_udata);
+ /* Otherwise, we continue searching. We subtract 1 from PC to avoid
+ hitting the beginning of the next region. */
+ pc = get_return_addr (udata, sub_udata) - 1;
}
/* If we haven't found a handler by now, this is an unhandled
@@ -3736,7 +3733,7 @@ label:
put_reg (i, val, my_udata);
}
- pc = get_return_addr (udata, sub_udata);
+ pc = get_return_addr (udata, sub_udata) - 1;
}
#ifdef INCOMING_REGNO