This is the mail archive of the gcc-bugs@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: Irix6 long doubles implemented wrong? (27_io/ostream_inserter_arith)


On Jan  7, 2003, Richard Henderson <rth@redhat.com> wrote:

>> * calls.c (emit_library_call_value_1): Handle return values
>> in a PARALLEL.

> Ok.

Checking in...

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>
	* calls.c (emit_library_call_value_1): Handle return values
	in a PARALLEL.

Index: gcc/calls.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/calls.c,v
retrieving revision 1.244.2.2
diff -u -p -r1.244.2.2 calls.c
--- gcc/calls.c 24 Jan 2003 23:15:23 -0000 1.244.2.2
+++ gcc/calls.c 26 Jan 2003 09:04:28 -0000
@@ -1,6 +1,6 @@
 /* Convert function calls to rtl insns, for GNU C compiler.
    Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998
-   1999, 2000, 2001 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -4142,7 +4142,7 @@ emit_library_call_value_1 (retval, orgfu
     {
       rtx insns;
 
-      if (valreg == 0 || GET_CODE (valreg) == PARALLEL)
+      if (valreg == 0)
 	{
 	  insns = get_insns ();
 	  end_sequence ();
@@ -4151,9 +4151,18 @@ emit_library_call_value_1 (retval, orgfu
       else
 	{
 	  rtx note = 0;
-	  rtx temp = gen_reg_rtx (GET_MODE (valreg));
+	  rtx temp;
 	  int i;
 
+	  if (GET_CODE (valreg) == PARALLEL)
+	    {
+	      temp = gen_reg_rtx (outmode);
+	      emit_group_store (temp, valreg, outmode);
+	      valreg = temp;
+	    }
+
+	  temp = gen_reg_rtx (GET_MODE (valreg));
+
 	  /* Construct an "equal form" for the value which mentions all the
 	     arguments in order as well as the function name.  */
 	  for (i = 0; i < nargs; i++)
@@ -4186,6 +4195,12 @@ emit_library_call_value_1 (retval, orgfu
 	    value = mem_value;
 	  if (value != mem_value)
 	    emit_move_insn (value, mem_value);
+	}
+      else if (GET_CODE (valreg) == PARALLEL)
+	{
+	  if (value == 0)
+	    value = gen_reg_rtx (outmode);
+	  emit_group_store (value, valreg, outmode);
 	}
       else if (value != 0)
 	emit_move_insn (value, valreg);
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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