diff mbox

Commit: RX: Add return pattern

Message ID 871ur6h3j6.fsf@redhat.com
State New
Headers show

Commit Message

Nick Clifton Jan. 11, 2012, 11:39 a.m. UTC
Hi Guys,

  I am checking in the patch below to fix a problem building the RX
  port.  Targets that define the "simple_return" pattern must also
  define a "return" pattern.  Otherwise gcc/function.c will fail to
  build.

Cheers
  Nick

gcc/ChangeLog
2012-01-11  Nick Clifton  <nickc@redhat.com>

	* config/rx/rx.md (return): Define pattern.

Comments

Richard Henderson Jan. 12, 2012, 4:29 a.m. UTC | #1
On 01/11/2012 10:39 PM, Nick Clifton wrote:
> +(define_expand "return"
> +  [(return)]
> +  ""
> +  "rx_expand_epilogue (false); DONE;"
> +)

Not an ideal solution, since the availability of this pattern implies
it's extremely cheap, and we'll replace jumps to the epilogue with
this pattern.

A hack-around might be

(define_expand "return"
  [(return)]
  "false"
  { gcc_unreachable (); })

Or to define an availability predicate similar to i386, testing if
the epilogue is trivial, and only a return insn is needed.


r~
diff mbox

Patch

Index: gcc/config/rx/rx.md
===================================================================
--- gcc/config/rx/rx.md	(revision 183092)
+++ gcc/config/rx/rx.md	(working copy)
@@ -340,6 +340,12 @@ 
    (set_attr "length" "2")]
 )
 
+(define_expand "return"
+  [(return)]
+  ""
+  "rx_expand_epilogue (false); DONE;"
+)
+
 (define_insn "simple_return"
   [(return)]
   ""