mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-20 17:49:38 +08:00
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
This commit is contained in:
parent
4eb66248bf
commit
4f870c0425
@ -1,3 +1,11 @@
|
|||||||
|
Wed Sep 17 18:19:53 1997 Jason Merrill <jason@yorick.cygnus.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
Wed Sep 17 18:33:59 1997 Jeffrey A Law (law@cygnus.com)
|
Wed Sep 17 18:33:59 1997 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
* mips/abi64.h (LONG_MAX_SPEC): Define.
|
* mips/abi64.h (LONG_MAX_SPEC): Define.
|
||||||
|
@ -2207,13 +2207,16 @@ void
|
|||||||
expand_builtin_set_return_addr_reg (addr_tree)
|
expand_builtin_set_return_addr_reg (addr_tree)
|
||||||
tree addr_tree;
|
tree addr_tree;
|
||||||
{
|
{
|
||||||
|
rtx tmp;
|
||||||
rtx ra = expand_builtin_return_addr (BUILT_IN_RETURN_ADDRESS,
|
rtx ra = expand_builtin_return_addr (BUILT_IN_RETURN_ADDRESS,
|
||||||
0, hard_frame_pointer_rtx);
|
0, hard_frame_pointer_rtx);
|
||||||
|
|
||||||
if (GET_CODE (ra) != REG || REGNO (ra) >= FIRST_PSEUDO_REGISTER)
|
if (GET_CODE (ra) != REG || REGNO (ra) >= FIRST_PSEUDO_REGISTER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
emit_move_insn (ra, expand_builtin_frob_return_addr (addr_tree));
|
tmp = force_operand (expand_builtin_frob_return_addr (addr_tree), ra);
|
||||||
|
if (tmp != ra)
|
||||||
|
emit_move_insn (ra, tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Choose two registers for communication between the main body of
|
/* Choose two registers for communication between the main body of
|
||||||
|
@ -3337,6 +3337,10 @@ find_exception_handler (void *pc, exception_table *table)
|
|||||||
int pos;
|
int pos;
|
||||||
int best = -1;
|
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
|
/* We can't do a binary search because the table isn't guaranteed
|
||||||
to be sorted from function to function. */
|
to be sorted from function to function. */
|
||||||
for (pos = 0; table[pos].exception_handler != (void *) -1; ++pos)
|
for (pos = 0; table[pos].exception_handler != (void *) -1; ++pos)
|
||||||
|
Loading…
Reference in New Issue
Block a user