except.c (expand_builtin_frob_return_addr): Add missing call to convert_memory_addres...
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Sat, 2 Jun 2001 10:52:11 +0000 (10:52 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 2 Jun 2001 10:52:11 +0000 (06:52 -0400)
* 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.

From-SVN: r42793

gcc/ChangeLog
gcc/except.c

index e11c903e3b261d73460ea22bf12bcde06f03b936..795c2bafeb65ae26a0a2c1a8ff8def4b12840bf5 100644 (file)
@@ -1,3 +1,10 @@
+Sat Jun  2 06:53:50 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * 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  <jan.vanmale@fenk.wau.nl>
 
        * doc/invoke.texi: Remove references to papers about sequence points
index c7493e7d9306c48f835bf5f1ed80e3e7c411bbb7..e59afc681f58147b4f680eb87c3e9a8ea4128ccd 100644 (file)
@@ -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);