From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id D41402FB70 for ; Tue, 19 Sep 2000 10:16:45 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.8.7/8.8.7) id KAA00450 for axp-list@listman.redhat.com; Tue, 19 Sep 2000 10:16:45 -0400 Received: from newton.math.purdue.edu (root@newton.math.purdue.edu [128.210.3.6]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id KAA00446 for ; Tue, 19 Sep 2000 10:16:45 -0400 Received: from polya.math.purdue.edu (lucier@polya.math.purdue.edu [128.210.3.194]) by newton.math.purdue.edu (8.10.1/8.10.1/PURDUE_MATH-4.0) with ESMTP id e8JEGTi12342; Tue, 19 Sep 2000 09:16:30 -0500 (EST) Received: (from lucier@localhost) by polya.math.purdue.edu (8.9.3/8.9.3/PURDUE_MATH-3.2) id JAA12026; Tue, 19 Sep 2000 09:16:28 -0500 (EST) From: Brad Lucier Message-Id: <200009191416.JAA12026@polya.math.purdue.edu> Subject: Re: Alpha/Linux FP denormal processing To: gatgul@voicenet.com (Uncle George) Date: Tue, 19 Sep 2000 09:16:28 -0500 (EST) Cc: axp-list@redhat.com, lucier@math.purdue.edu (Brad Lucier) In-Reply-To: <39C731E0.F495718B@voicenet.com> from "Uncle George" at Sep 19, 2000 04:29:04 AM X-Mailer: ELM [version 2.5 PL0] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors 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