* Another test case
@ 1998-02-17 13:54 H.J. Lu
1998-02-17 23:59 ` Jeffrey A Law
1998-02-18 2:42 ` Richard Henderson
0 siblings, 2 replies; 6+ messages in thread
From: H.J. Lu @ 1998-02-17 13:54 UTC (permalink / raw)
To: egcs
Hi,
Here is another new test case for alpha. I'd like to see it in
1.0.2.
Thanks.
--
H.J. Lu (hjl@gnu.org)
----
Tue Feb 17 08:17:42 1998 H.J. Lu (hjl@gnu.org)
* gcc.dg/980217-1.c: New to test IEEE float on alpha.
--- /dev/null Wed Dec 31 16:00:00 1969
+++ gcc.dg/980217-1.c Tue Feb 17 13:17:25 1998
@@ -0,0 +1,36 @@
+/* Test float on alpha. */
+
+/* { dg-do run { target alpha*-*-* } } */
+/* { dg-options "-mieee -O2" } */
+
+typedef int int32_t __attribute__ ((__mode__ ( __SI__ ))) ;
+typedef union
+{
+ float value;
+ int32_t word;
+} ieee_float_shape_type;
+
+int isinff(float x)
+{
+ int32_t ix,t;
+ ieee_float_shape_type gf_u;
+ gf_u.value = x;
+ ix = gf_u.word;
+ printf ("%x\n", ix);
+ t = ix & 0x7fffffff;
+ t ^= 0x7f800000;
+ t |= -t;
+ return ~(t >> 31) & (1 - ((ix & 0x80000000) >> 30));
+}
+
+main ()
+{
+ float x = 1.0 / 0.0;
+ int i = isinff (x);
+
+ if (i == 0)
+ abort ();
+
+ printf ("%d\n", i);
+ return 0;
+}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Another test case
1998-02-17 13:54 Another test case H.J. Lu
@ 1998-02-17 23:59 ` Jeffrey A Law
1998-02-18 14:54 ` H.J. Lu
1998-02-18 2:42 ` Richard Henderson
1 sibling, 1 reply; 6+ messages in thread
From: Jeffrey A Law @ 1998-02-17 23:59 UTC (permalink / raw)
To: H.J. Lu; +Cc: egcs
In message < m0y4uRL-00058KC@ocean.lucon.org >you write:
> Here is another new test case for alpha. I'd like to see it in
> 1.0.2.
>
> Thanks.
>
>
> --
> H.J. Lu (hjl@gnu.org)
> ----
> Tue Feb 17 08:17:42 1998 H.J. Lu (hjl@gnu.org)
>
> * gcc.dg/980217-1.c: New to test IEEE float on alpha.
I've installed the test on the mainline sources; I don't think
we really need to install it on the release branch.
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Another test case
1998-02-17 13:54 Another test case H.J. Lu
1998-02-17 23:59 ` Jeffrey A Law
@ 1998-02-18 2:42 ` Richard Henderson
1998-02-18 7:43 ` David Edelsohn
1998-02-18 8:56 ` H.J. Lu
1 sibling, 2 replies; 6+ messages in thread
From: Richard Henderson @ 1998-02-18 2:42 UTC (permalink / raw)
To: H.J. Lu; +Cc: egcs
On Tue, Feb 17, 1998 at 01:20:31PM -0800, H.J. Lu wrote:
> Here is another new test case for alpha.
Actually, I see no reason I can think not to just make this
generic. Does any currently supported platform _not_ use
ieee754 single precision numbers as float?
r~
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Another test case
1998-02-18 2:42 ` Richard Henderson
@ 1998-02-18 7:43 ` David Edelsohn
1998-02-18 8:56 ` H.J. Lu
1 sibling, 0 replies; 6+ messages in thread
From: David Edelsohn @ 1998-02-18 7:43 UTC (permalink / raw)
To: Richard Henderson; +Cc: H.J. Lu, egcs
>>>>> Richard Henderson writes:
Richard> Actually, I see no reason I can think not to just make this
Richard> generic. Does any currently supported platform _not_ use
Richard> ieee754 single precision numbers as float?
The POWER architecture only provides double-precision
floating-point. Values are restricted to single-precision when storing to
memory. PowerPC adds full single-precision FP.
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Another test case
1998-02-18 2:42 ` Richard Henderson
1998-02-18 7:43 ` David Edelsohn
@ 1998-02-18 8:56 ` H.J. Lu
1 sibling, 0 replies; 6+ messages in thread
From: H.J. Lu @ 1998-02-18 8:56 UTC (permalink / raw)
To: rth; +Cc: egcs
>
> On Tue, Feb 17, 1998 at 01:20:31PM -0800, H.J. Lu wrote:
> > Here is another new test case for alpha.
>
> Actually, I see no reason I can think not to just make this
> generic. Does any currently supported platform _not_ use
> ieee754 single precision numbers as float?
>
I have to add -mieee which doesn't work on x86.
--
H.J. Lu (hjl@gnu.org)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Another test case
1998-02-17 23:59 ` Jeffrey A Law
@ 1998-02-18 14:54 ` H.J. Lu
0 siblings, 0 replies; 6+ messages in thread
From: H.J. Lu @ 1998-02-18 14:54 UTC (permalink / raw)
To: law; +Cc: egcs
>
> In message < m0y4uRL-00058KC@ocean.lucon.org >you write:
> > Here is another new test case for alpha. I'd like to see it in
> > 1.0.2.
> >
> > Thanks.
> >
> >
> > --
> > H.J. Lu (hjl@gnu.org)
> > ----
> > Tue Feb 17 08:17:42 1998 H.J. Lu (hjl@gnu.org)
> >
> > * gcc.dg/980217-1.c: New to test IEEE float on alpha.
> I've installed the test on the mainline sources; I don't think
> we really need to install it on the release branch.
>
Since that bug was discovered when egcs 1.0.2 was used to compile
glibc 2.1, I think it should be in egcs 1.0.2.
--
H.J. Lu (hjl@gnu.org)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1998-02-18 14:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-17 13:54 Another test case H.J. Lu
1998-02-17 23:59 ` Jeffrey A Law
1998-02-18 14:54 ` H.J. Lu
1998-02-18 2:42 ` Richard Henderson
1998-02-18 7:43 ` David Edelsohn
1998-02-18 8:56 ` H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).