Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Brad Lucier <lucier@math.purdue.edu>
To: gatgul@voicenet.com (Uncle George)
Cc: axp-list@redhat.com, lucier@math.purdue.edu (Brad Lucier)
Subject: Re: Alpha/Linux FP denormal processing
Date: Tue, 19 Sep 2000 09:16:28 -0500 (EST)	[thread overview]
Message-ID: <200009191416.JAA12026@polya.math.purdue.edu> (raw)
In-Reply-To: <39C731E0.F495718B@voicenet.com> from "Uncle George" at Sep 19, 2000 04:29:04 AM

Here's the program:

int main()
{
  double x = 1.0;
  for (x = 1.0; x != 0.0; x *=0.5)
    printf("%e\n", x);
}

Here's the end of the output:

6.324040e-322
3.162020e-322
1.581010e-322
7.905050e-323
3.952525e-323
1.976263e-323
9.881313e-324
4.940656e-324

Here's the compiler I use:

popov-141% gcc -v
Reading specs from /export/u10/gcc-2.95.1/lib/gcc-lib/alphaev6-unknown-linux-gnu/2.95.1/specs
gcc version 2.95.1 19990816 (release)

and here's the assembler (there are no trapb instructions because
this is 21264 and they aren't needed):

popov-143% cat testdenorm.s
        .file   1 "testdenorm.c"
        .set noat
        .set noreorder
        .arch ev6
.section        .rodata
$LC1:
        .ascii "%e\12\0"
        .align 3
$LC0:
        .t_floating 1.00000000000000000000e0
        .align 3
$LC2:
        .t_floating 5.00000000000000000000e-1
.text
        .align 5
        .globl main
        .ent main
main:
        .eflag 48
        .frame $15,32,$26,0
        .mask 0x4008000,-32
        ldgp $29,0($27)
$main..ng:
        lda $30,-32($30)
        stq $26,0($30)
        stq $15,8($30)
        mov $30,$15
        .prologue 1
        lda $1,$LC0
        ldt $f10,0($1)
        stt $f10,16($15)
        lda $1,$LC0
        ldt $f10,0($1)
        stt $f10,16($15)
$L3:
        ldt $f10,16($15)
        cmpteqsu $f10,$f31,$f11    <=  su implies ieee fp version of instruction
        fbeq $f11,$L6
        br $31,$L4
$L6:
        lda $16,$LC1
        ldt $f17,16($15)
        jsr $26,printf
        ldgp $29,0($26)
$L5:
        ldt $f10,16($15)
        lda $1,$LC2
        ldt $f11,0($1)
        multsu $f10,$f11,$f12    <=  su implies ieee fp version of instruction
        fmov $f12,$f10
        stt $f10,16($15)
        br $31,$L3
$L4:
$L2:
        mov $15,$30
        ldq $26,0($30)
        ldq $15,8($30)
        lda $30,32($30)
        ret $31,($26),1
        .end main
        .ident  "GCC: (GNU) 2.95.1 19990816 (release)"

Brad Lucier

> 
> CPU dont matter, as well as gcc. all denorm FP numbers are trapped to the kernel,
> as the FPU ( even up to a 21264 ) cant process them :-/
> /gat
> 
> Brad Lucier wrote:
> 
> > You don't say what compiler or CPU you're using.  Try -mieee with gcc.
> >
> > Brad Lucier
> >
> > > Is there anyone who has knowledge of how FPU underflows of denormal numbers
> > > are to be processed in Alpha/linux.  The concept of a ieee rolling underflow
> > > seems to stop at the smallest  FPU normalized number. Tests expect that the
> > > smallest should go to e-324. on True64 the test will go till e-324 if u use
> > > the ieee switch. On alpha/linux I cannot get it to go beyond e-308, no
> > > matter what FloatingPointControlRegister bits i set.
> > > /gat




  parent reply	other threads:[~2000-09-19 14:16 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-16 23:58 OT: gcc on DU5 Larry Snyder
2000-09-17  1:15 ` Peter Petrakis
2000-09-17 17:26   ` J Bacher
2000-09-18  3:29 ` Peter Rival
2000-09-17 16:21   ` Larry Snyder
2000-09-17 23:15   ` Richard Henderson
2000-09-19  0:59     ` Alpha/Linux FP denormal processing Uncle George
2000-09-19  1:54       ` Brad Lucier
2000-09-19  9:29         ` Uncle George
2000-09-19 13:03           ` Greg Lindahl
2000-09-19 16:48             ` Richard Henderson
2000-09-19 14:16           ` Brad Lucier [this message]
2000-09-19 14:31             ` Uncle George
2000-09-19 16:25               ` Michal Jaegermann
2000-09-19 17:27                 ` Jeff Sturm
2000-09-19 17:43                   ` Michal Jaegermann
2000-09-19 19:10                     ` Uncle George
2000-09-19 19:30                       ` Michal Jaegermann
2000-09-19 19:46                         ` Brad Lucier
2000-09-19 20:03                           ` Uncle George
2000-09-19 20:16                             ` Brad Lucier
2000-09-19 21:09                               ` Michal Jaegermann
2000-09-19 21:48                                 ` Brad Lucier
2000-09-19 22:41                                   ` Uncle George
2000-09-20  7:00                                   ` Christian Iseli
2000-09-19 22:09                                 ` Brad Lucier
2000-09-19 22:42                                   ` Michal Jaegermann
2000-09-19 23:02                                     ` Brad Lucier
2000-09-19 23:55                                       ` Michal Jaegermann
2000-09-20  1:39                                         ` W Bauske
2000-09-20  8:24                                           ` Helge Kreutzmann
2000-09-20  0:12                                       ` Brad Lucier
2000-09-20  7:53                                       ` Uncle George
2000-09-19 20:33                           ` Michal Jaegermann
2000-09-19 16:52               ` Richard Henderson
2000-09-20  2:23                 ` Richard Henderson
2000-09-20  3:58                   ` David S. Miller
2000-09-21 21:17                     ` Richard Henderson
2000-09-21 21:50                       ` David S. Miller
2000-09-22  2:25                         ` Did MySQL ever get the port completed? Rich Peters
2000-09-22  5:27                           ` Rich Peters
2000-09-22  5:27                         ` Rich Peters
2000-09-19 12:10       ` Alpha/Linux FP denormal processing Jeff Sturm
  -- strict thread matches above, loose matches on Subject: below --
2000-09-19 21:26 Arkadiy Chapkis - Arc
2000-09-19 23:06 ` Uncle George
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox