diff options
author | Eric Christopher <echristo@gcc.gnu.org> | 2002-09-26 21:39:14 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gcc.gnu.org> | 2002-09-26 21:39:14 +0000 |
commit | 0ab38418078d2ddaa2fdfe0c4a10dc6d477d0d5f (patch) | |
tree | 34b3332ef230bf8803ef36ae89dea79af18bdcea /gcc/except.c | |
parent | 68bb91b1e084c648b88eb221dc0cfbf18d74dd8a (diff) | |
download | gcc-0ab38418078d2ddaa2fdfe0c4a10dc6d477d0d5f.tar.gz |
except.c (expand_builtin_extract_return_address): Handle case where Pmode != ptr_mode.
2002-09-24 Eric Christopher <echristo@redhat.com>
* except.c (expand_builtin_extract_return_address): Handle case
where Pmode != ptr_mode.
From-SVN: r57552
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c index 26a231b87db..08c0aa27ab2 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); |