diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/except.c | 10 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 74d76b0..7927cc7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-09-24 Eric Christopher <echristo@redhat.com> + + * except.c (expand_builtin_extract_return_address): Handle case + where Pmode != ptr_mode. + 2002-09-26 Steve Ellcey <sje@cup.hp.com> * config/ia64/hpux.h (ASM_OUTPUT_EXTERNAL_LIBCALL): New @@ -17,7 +22,7 @@ 2002-09-26 Ulrich Weigand <uweigand@de.ibm.com> - * expr.c (expand_expr) [MINUS_EXPR]: Convert A - const to + * expr.c (expand_expr) [MINUS_EXPR]: Convert A - const to A + (-const) on RTX level, even for unsigned types. 2002-09-26 Ulrich Weigand <uweigand@de.ibm.com> diff --git a/gcc/except.c b/gcc/except.c index 26a231b..08c0aa2 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2993,6 +2993,16 @@ expand_builtin_extract_return_addr (addr_tree) { rtx addr = expand_expr (addr_tree, NULL_RTX, Pmode, 0); + if (GET_MODE (addr) != Pmode + && GET_MODE (addr) != VOIDmode) + { +#ifdef POINTERS_EXTEND_UNSIGNED + addr = convert_memory_address (Pmode, addr); +#else + addr = convert_to_mode (Pmode, addr, 0); +#endif + } + /* First mask out any unwanted bits. */ #ifdef MASK_RETURN_ADDR expand_and (Pmode, addr, MASK_RETURN_ADDR, addr); |