aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Christopher <echristo@gcc.gnu.org>2002-09-26 21:39:14 +0000
committerEric Christopher <echristo@gcc.gnu.org>2002-09-26 21:39:14 +0000
commit0ab38418078d2ddaa2fdfe0c4a10dc6d477d0d5f (patch)
tree34b3332ef230bf8803ef36ae89dea79af18bdcea
parent68bb91b1e084c648b88eb221dc0cfbf18d74dd8a (diff)
downloadgcc-0ab38418078d2ddaa2fdfe0c4a10dc6d477d0d5f.zip
gcc-0ab38418078d2ddaa2fdfe0c4a10dc6d477d0d5f.tar.gz
gcc-0ab38418078d2ddaa2fdfe0c4a10dc6d477d0d5f.tar.bz2
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
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/except.c10
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);