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]

IA-64 patch for abort when passing 1.0L as unnamed argument


The IA-64 port aborts if you pass long double constants 1.0L or 0.0L to
an unprototyped, varargs, or stdarg function.  E.g.

sub ()
{
  foo (1.0L);
}

This problem only happens for those two values, because those values exist
in fixed FP registers.

The problem is an unnoticed typo.  The last argument to operand_subword is
the mode of the first argument, not the mode of the desired result.

I suspect this will also fix some glibc make check failures that I hadn't
gotten around to debugging yet.

This was tested with an ia64-linux bootstrap.  The bootstrap failed building
libstdc++/libsupc++ because of a problem with libsupc++.  libstdc++ tries
to build the libsupc++ subdir before it builds the src subdir.  However,
building libsupc++ tries to link in libstdc++ which comes from the as yet
unbuilt src subdir, so we get a link error.  It looks like there is libtool
stuff in the libsupc++ directory to try to prevent libsdtc++ from being linked
in, but it does not appear to be working.  Anyways, this is unrelated to
the problem I am fixing, so I am checking in the patch anyways, onto both
the trunk and branch.

2001-03-27  Jim Wilson  <wilson@redhat.com>

	* config/ia64/ia64.md (movtf): Change DImode to TFmode in calls to
	operand_subword.

Index: config/ia64/ia64.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.md,v
retrieving revision 1.60
diff -p -r1.60 ia64.md
*** ia64.md	2001/01/24 04:30:47	1.60
--- ia64.md	2001/03/28 00:42:03
***************
*** 707,715 ****
        if (GET_CODE (operands[1]) == CONST_DOUBLE)
  	{
  	  emit_move_insn (gen_rtx_REG (DImode, REGNO (operands[0])),
! 			  operand_subword (operands[1], 0, 0, DImode));
  	  emit_move_insn (gen_rtx_REG (DImode, REGNO (operands[0]) + 1),
! 			  operand_subword (operands[1], 1, 0, DImode));
  	  DONE;
  	}
  
--- 707,715 ----
        if (GET_CODE (operands[1]) == CONST_DOUBLE)
  	{
  	  emit_move_insn (gen_rtx_REG (DImode, REGNO (operands[0])),
! 			  operand_subword (operands[1], 0, 0, TFmode));
  	  emit_move_insn (gen_rtx_REG (DImode, REGNO (operands[0]) + 1),
! 			  operand_subword (operands[1], 1, 0, TFmode));
  	  DONE;
  	}
  


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