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]

Re: frv sibcalls and conditional returns


On Apr 20, 2004, Alexandre Oliva <aoliva@redhat.com> wrote:

> 	(return_unsigned_true, return_unsigned_false): New.

Doh, I hadn't realized we still hadn't contributed the signed versions
of these patterns.  Here they are.  Ok?

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	2003-11-19  Richard Sandiford  <rsandifo@redhat.com>
	* config/frv/frv.md (*return_true, *return_false): New patterns.

Index: gcc/config/frv/frv.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.md,v
retrieving revision 1.14
diff -u -p -r1.14 frv.md
--- gcc/config/frv/frv.md 2 May 2004 04:57:47 -0000 1.14
+++ gcc/config/frv/frv.md 2 May 2004 05:04:42 -0000
@@ -5539,6 +5539,30 @@
   [(set_attr "length" "4")
    (set_attr "type" "jump,jumpl")])
 
+(define_insn "*return_true"
+  [(set (pc)
+	(if_then_else (match_operator:CC 0 "signed_relational_operator"
+					 [(match_operand 1 "icc_operand" "t")
+					  (const_int 0)])
+		      (return)
+		      (pc)))]
+  "direct_return_p ()"
+  "b%c0lr %1,%#"
+  [(set_attr "length" "4")
+   (set_attr "type" "jump")])
+
+(define_insn "*return_false"
+  [(set (pc)
+	(if_then_else (match_operator:CC 0 "signed_relational_operator"
+					 [(match_operand 1 "icc_operand" "t")
+					  (const_int 0)])
+		      (pc)
+		      (return)))]
+  "direct_return_p ()"
+  "b%C0lr %1,%#"
+  [(set_attr "length" "4")
+   (set_attr "type" "jump")])
+
 (define_insn "*return_unsigned_true"
   [(set (pc)
 	(if_then_else (match_operator:CC_UNS 0 "unsigned_relational_operator"
-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

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