OSDN Git Service

Fix i960 build failure with unrecognizable insn.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Jan 1999 13:34:42 +0000 (13:34 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Jan 1999 13:34:42 +0000 (13:34 +0000)
* function.c (expand_function_end): Pass arg_pointer_save_area to
validize_mem before using it.  Emit code into a sequence.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24872 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/function.c

index aa0c620..1c3e50d 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 1cb8c44..ee76aa6 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.  */