diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e11c903e3b2..795c2bafeb6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Sat Jun 2 06:53:50 2001 Richard Kenner + + * except.c (expand_builtin_frob_return_addr): Add missing call + to convert_memory_address #ifdef POINTERS_EXTEND_UNSIGNED. + (expand_builtin_eh_return): Likewise. + (expand_eh_return): Clean up ptr_mode != Pmode cases. + 2001-06-01 Jan van Male * doc/invoke.texi: Remove references to papers about sequence points diff --git a/gcc/except.c b/gcc/except.c index c7493e7d930..e59afc681f5 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2968,6 +2968,10 @@ expand_builtin_frob_return_addr (addr_tree) { rtx addr = expand_expr (addr_tree, NULL_RTX, Pmode, 0); +#ifdef POINTERS_EXTEND_UNSIGNED + addr = convert_memory_address (Pmode, addr); +#endif + #ifdef RETURN_ADDR_OFFSET addr = force_reg (Pmode, addr); addr = plus_constant (addr, -RETURN_ADDR_OFFSET); @@ -2988,6 +2992,11 @@ expand_builtin_eh_return (stackadj_tree, handler_tree) stackadj = expand_expr (stackadj_tree, cfun->eh->ehr_stackadj, VOIDmode, 0); handler = expand_expr (handler_tree, cfun->eh->ehr_handler, VOIDmode, 0); +#ifdef POINTERS_EXTEND_UNSIGNED + stackadj = convert_memory_address (Pmode, stackadj); + handler = convert_memory_address (Pmode, handler); +#endif + if (! cfun->eh->ehr_label) { cfun->eh->ehr_stackadj = copy_to_reg (stackadj); @@ -3035,8 +3044,6 @@ expand_eh_return () else #endif { - rtx handler; - ra = EH_RETURN_HANDLER_RTX; if (! ra) { @@ -3045,17 +3052,7 @@ expand_eh_return () } emit_move_insn (sa, cfun->eh->ehr_stackadj); - - handler = cfun->eh->ehr_handler; - if (GET_MODE (ra) != Pmode) - { -#ifdef POINTERS_EXTEND_UNSIGNED - handler = convert_memory_address (GET_MODE (ra), handler); -#else - handler = convert_to_mode (GET_MODE (ra), handler, 0); -#endif - } - emit_move_insn (ra, handler); + emit_move_insn (ra, cfun->eh->ehr_handler); } emit_label (around_label);