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]

SH sibcall patterns were missing fpmode attribute


We wouldn't always switch to the correct mode before a sibcall.  I'm
checking this in.

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

	* config/sh/sh.md (sibcalli, sibcalli_pcrel, sibcalli): Set
	fp_mode attribute.

Index: gcc/config/sh/sh.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sh/sh.md,v
retrieving revision 1.77
diff -u -p -r1.77 sh.md
--- gcc/config/sh/sh.md 2001/02/07 06:05:09 1.77
+++ gcc/config/sh/sh.md 2001/02/09 19:35:48
@@ -3544,6 +3544,9 @@
   ""
   "jmp	@%0%#"
   [(set_attr "needs_delay_slot" "yes")
+   (set (attr "fp_mode")
+	(if_then_else (eq_attr "fpu_single" "yes")
+		      (const_string "single") (const_string "double")))
    (set_attr "type" "jump_ind")])
 
 (define_insn "sibcalli_pcrel"
@@ -3555,6 +3558,9 @@
   "TARGET_SH2"
   "braf	%0\\n%O2:%#"
   [(set_attr "needs_delay_slot" "yes")
+   (set (attr "fp_mode")
+	(if_then_else (eq_attr "fpu_single" "yes")
+		      (const_string "single") (const_string "double")))
    (set_attr "type" "jump_ind")])
 
 (define_insn_and_split "sibcall_pcrel"
@@ -3577,7 +3583,12 @@
 						  lab));
   SIBLING_CALL_P (call_insn) = 1;
   DONE;
-}")
+}"
+  [(set_attr "needs_delay_slot" "yes")
+   (set (attr "fp_mode")
+	(if_then_else (eq_attr "fpu_single" "yes")
+		      (const_string "single") (const_string "double")))
+   (set_attr "type" "jump_ind")])
 
 (define_expand "sibcall"
   [(parallel

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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