www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/11/03/01:43:57

Date: Wed, 2 Nov 94 21:20:53 -0500
From: dj AT stealth DOT ctron DOT com (DJ Delorie)
To: shaw AT cix DOT compulink DOT co DOT uk
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: GCC 260 Maths Bug

broke		works		meaning
0xc7a		0x0f7f
1100 0111 1010	1111 0111 1111
  XX		  XX		Precision control (00=24 bits, 11=64 bits)
           X               X	Zero Divide exception (0=exception, 1=handle it)
             X               X	Invalid Operation exception (0=exception, 1=handle it)

Clearly, the precision is wrong, but I think the masks are right, so
the "correct" control word, in my opinion, is 0x037a.  The current
go32 sources do not change the precision after the FNINIT.  FNINIT
is supposed to set the control word to 0x037f.

Note: the top two bits are rounding; 00=round to nearest or even,
11=chop towards zero.  I think rounding is best.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019