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 B727C2F7C4 for ; Fri, 29 Sep 2000 14:23:02 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id e8TIMqJ29353 for axp-list@listman.redhat.com; Fri, 29 Sep 2000 14:22:52 -0400 Received: from voicenet.com (mail12.voicenet.com [207.103.0.6]) by mail.redhat.com (8.11.0/8.8.7) with SMTP id e8TIMqD29349 for ; Fri, 29 Sep 2000 14:22:52 -0400 Received: (qmail 15540 invoked from network); 29 Sep 2000 18:22:50 -0000 Received: from dialpool0738-pri.voicenet.com (HELO voicenet.com) (209.71.86.166) by mail12.voicenet.com with SMTP; 29 Sep 2000 18:22:50 -0000 Message-ID: <39D4DE43.4DF4DCF7@voicenet.com> Date: Fri, 29 Sep 2000 13:24:03 -0500 From: Uncle George Organization: GatWorks X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.16 alpha) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com Subject: a cvtts/s of a denorm ->0.0 Content-Type: multipart/mixed; boundary="------------ED20ECDE18A73D2AEFE7CF19" 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 This is a multi-part message in MIME format. --------------ED20ECDE18A73D2AEFE7CF19 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit It seems that the conversion of a double/denorm value into a float/denorm gets truncated into 0.0 . In the attached example, the (correct) double result of the fmod , get chopped ( ie cvtts/s ) into 0.0 and stored in c. I was expecting to see the float denorm of 0x1 back. /gat --------------ED20ECDE18A73D2AEFE7CF19 Content-Type: text/plain; charset=us-ascii; name="fmod.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fmod.c" main() { extern double fmod( double a, double b ); float a, b, c; union { float f; int i; } u; long fpcr; asm( "excb; mf_fpcr %0" : "=f"(fpcr)); printf(" fpcr = %p\n", fpcr ); #if 1 fpcr |= (1L << 47); /* DNOD Not avail in 21264(a) */ fpcr &= ~(1L << 48 ); /* DNZ idenormal Operands to Zero */ fpcr |= (1L << 49); /* DNOD Not avail in 21264(a) */ fpcr &= ~(1L << 60 ); /* UNDZ underflow to zero OFF */ fpcr |= (1L << 61); /* UNFD underflow disable ON */ /* fpcr |= (1L << 62); UNFD */ asm volatile ( "mt_fpcr %0 ; excb" : : "f"(fpcr)); #endif asm( "excb; mf_fpcr %0" : "=f"(fpcr)); printf(" fpcr = %p\n", fpcr ); u.i = 1; a = u.f; u.i = 0xff800000; b = u.f; c = fmod( a, b ); } --------------ED20ECDE18A73D2AEFE7CF19--