aboutsummaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1997-09-18 01:23:34 +0000
committerJason Merrill <jason@gcc.gnu.org>1997-09-17 21:23:34 -0400
commit4f870c0425a0c03ddc1535d2e8469a28ddc105cc (patch)
treed7cf840b09538a089b4015c393caa2b4c008faaa /gcc/libgcc2.c
parent4eb66248bf9ba2c160f05da1b684412c17374aff (diff)
downloadgcc-4f870c0425a0c03ddc1535d2e8469a28ddc105cc.zip
gcc-4f870c0425a0c03ddc1535d2e8469a28ddc105cc.tar.gz
gcc-4f870c0425a0c03ddc1535d2e8469a28ddc105cc.tar.bz2
libgcc2.c (find_exception_handler): Subtract one from our PC when looking for a handler...
* libgcc2.c (find_exception_handler): Subtract one from our PC when looking for a handler, to avoid hitting the beginning of the next region. * except.c (expand_builtin_set_return_addr_reg): Use force_operand. From-SVN: r15534
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 34a6c71..6b3b7b4 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -3337,6 +3337,10 @@ 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)