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]

Re: PATCH: HUGE_VAL should be Infinity


> On Thu, Nov 30, 2000 at 11:19:21PM -0700, Jeffrey A Law wrote:
> > 
> >   In message <200011302016.PAA28575@hiauly1.hia.nrc.ca>you write:
> >   > The fneg instruction on PA2.0 gear does negate +0. correctly.  Thus, there
> >   > is only a problem with PA1.0 and PA1.1 hardware which uses fsub.  The HP
> >   > compiler doesn't have the problem since it multiplies by -1. instead.
> > I think there was a case where that's not 100% valid either, though I think
> > it would be closer to conforming behavior than fsub.
> > 
> > FWIW, it may be the case that PA1.0 had fneg -- I don't have my manuals
> > handy, but there were a few instructions in PA1.0 that got removed.
> 
> FWIW, FNEG is not in my 1989 manual, which I think is PA1.1.

Last week, I had concluded that hpux 10.20 emulates fneg on my PA1.1 machine
(a 735).

I am planning to implement ieee compatible negdf2 and negsf2 insns for
PA1.X machines.  It looked like multiplaction by -1 would be the most
efficient implementation since twiddling the sign bit of a floating
pointer register appears to involve copying to a general register via
memory and back again.  Multiplaction also looks simpler.  If Jeff can
recall whether or not there are corner effects with the multiplication
method it would be useful.

I have separated out a patch to make the hugeval test an expected failure
under HP-UX 9 and 10.  As far as I can seen, there is no way to fix this
problem under these OS's because their math libraries are inconsistent
with the current IEEE definition of HUGE_VAL.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2000-11-30  J. David Anglin  <dave@hiauly1.hia.nrc.ca>

	* hugeval.x: New.  Execution is expected to fail under hpux 9.X
	and 10.X because HUGE_VAL is DBL_MAX instead of +Infinity.

--- gcc.c-torture/execute/ieee/hugeval.x.orig	Wed Oct 18 13:51:17 2000
+++ gcc.c-torture/execute/ieee/hugeval.x	Wed Oct 18 15:01:21 2000
@@ -0,0 +1,10 @@
+# This test fails under hpux 9.X and 10.X because HUGE_VAL is DBL_MAX
+# instead of +Infinity.
+
+global target_triplet
+if { [istarget "hppa*-*-hpux9*"] || [istarget "hppa*-*-hpux10*"] } {
+      set torture_execute_xfail "$target_triplet"
+}
+
+return 0
+

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