This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

v850: Restore frame size check to return pattern.


Hi Guys,

  I am applying the patch below to restore the frame size check to the
  v850's return pattern.  Having run the gcc and g++ testsuites I
  discovered why it was there and the consequences of not having it.
  (They were bad - lots of programs went into infinite loops because
  the wrong return instruction was being used).

Cheers
  Nick

gcc/ChangeLog
2008-09-09  Nick Clifton  <nickc@redhat.com>

	* config/v850/v850.md (return): Restore frame size restriction.

Index: gcc/config/v850/v850.md
===================================================================
--- gcc/config/v850/v850.md	(revision 140138)
+++ gcc/config/v850/v850.md	(working copy)
@@ -1563,7 +1563,7 @@
 
 (define_insn "return"
   [(return)]
-  "reload_completed"
+  "reload_completed && compute_frame_size (get_frame_size (), (long *)0) == 0"
   "jmp [r31]"
   [(set_attr "length" "2")
    (set_attr "cc" "none")])


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]