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]

[ARM/hard_vfp_4_4_branch] Fix build on SPARC.


Hi,

Attached is a patch to fix SPARC gcc build.

On ARM/hard_vfp_4_4_branch, hard_libcall_value requires a libcall rtx
as the second parameter although SPARC's LIBCALL_VALUE ignores the
rtx.

Tested by building gcc.  OK to apply?

Kazu Hirata

2009-04-15  Kazu Hirata  <kazu@codesourcery.com>

	* config/sparc/sparc.c (sparc_emit_float_lib_cmp): Pass a libcall
	SYMBOL_REF to hard_libcall_value.

Index: gcc/config/sparc/sparc.c
===================================================================
--- gcc/config/sparc/sparc.c	(revision 146075)
+++ gcc/config/sparc/sparc.c	(working copy)
@@ -6120,7 +6120,7 @@ enum rtx_code
 sparc_emit_float_lib_cmp (rtx x, rtx y, enum rtx_code comparison)
 {
   const char *qpfunc;
-  rtx slot0, slot1, result, tem, tem2;
+  rtx slot0, slot1, result, tem, tem2, libfunc;
   enum machine_mode mode;
   enum rtx_code new_comparison;
 
@@ -6183,7 +6183,8 @@ sparc_emit_float_lib_cmp (rtx x, rtx y, 
 	  emit_move_insn (slot1, y);
 	}
 
-      emit_library_call (gen_rtx_SYMBOL_REF (Pmode, qpfunc), LCT_NORMAL,
+      libfunc = gen_rtx_SYMBOL_REF (Pmode, qpfunc);
+      emit_library_call (libfunc, LCT_NORMAL,
 			 DImode, 2,
 			 XEXP (slot0, 0), Pmode,
 			 XEXP (slot1, 0), Pmode);
@@ -6191,7 +6192,8 @@ sparc_emit_float_lib_cmp (rtx x, rtx y, 
     }
   else
     {
-      emit_library_call (gen_rtx_SYMBOL_REF (Pmode, qpfunc), LCT_NORMAL,
+      libfunc = gen_rtx_SYMBOL_REF (Pmode, qpfunc);
+      emit_library_call (libfunc, LCT_NORMAL,
 			 SImode, 2,
 			 x, TFmode, y, TFmode);
       mode = SImode;
@@ -6202,7 +6204,7 @@ sparc_emit_float_lib_cmp (rtx x, rtx y, 
      register so reload doesn't clobber the value if it needs
      the return register for a spill reg.  */
   result = gen_reg_rtx (mode);
-  emit_move_insn (result, hard_libcall_value (mode));
+  emit_move_insn (result, hard_libcall_value (mode, libfunc));
 
   switch (comparison)
     {


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