Fix i960 build failure with unrecognizable insn.
authorJim Wilson <wilson@cygnus.com>
Tue, 26 Jan 1999 13:34:42 +0000 (13:34 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 26 Jan 1999 13:34:42 +0000 (05:34 -0800)
* function.c (expand_function_end): Pass arg_pointer_save_area to
validize_mem before using it.  Emit code into a sequence.

From-SVN: r24872

gcc/ChangeLog
gcc/function.c

index aa0c62091989319c04e1efe7f0961331efb67e4d..1c3e50d25766e0ea91a91b74584d29d4b45d4508 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jan 26 13:31:38 1999  Jim Wilson  <wilson@cygnus.com>
+
+       * function.c (expand_function_end): Pass arg_pointer_save_area to
+       validize_mem before using it.  Emit code into a sequence.
+
 Tue Jan 26 13:41:38 1999  David Edelsohn  <edelsohn@mhpcc.edu>
 
        * rs6000.md (doz + set cr and or + set cr patterns): Add missing
index 1cb8c44bbcd3829d2c47d8cf45eeb56e5268edd7..ee76aa6bb523107ac3643d67d35072f2b7e54da7 100644 (file)
@@ -5947,8 +5947,15 @@ expand_function_end (filename, line, end_bindings)
   /* Save the argument pointer if a save area was made for it.  */
   if (arg_pointer_save_area)
     {
-      rtx x = gen_move_insn (arg_pointer_save_area, virtual_incoming_args_rtx);
-      emit_insn_before (x, tail_recursion_reentry);
+      /* arg_pointer_save_area may not be a valid memory address, so we
+        have to check it and fix it if necessary.  */
+      rtx seq;
+      start_sequence ();
+      emit_move_insn (validize_mem (arg_pointer_save_area),
+                     virtual_incoming_args_rtx);
+      seq = gen_sequence ();
+      end_sequence ();
+      emit_insn_before (seq, tail_recursion_reentry);
     }
 
   /* Initialize any trampolines required by this function.  */