Re: One more oddity with gcc and vax floats...

Anders Magnusson <[email protected]> Wed, 10 Jun 2026 16:04:03 +0200
Newsgroups gmane.os.netbsd.ports.vax
Message-ID <[email protected]>
Den 2026-06-10 kl. 13:41, skrev Johnny Billquist:
> On 6/10/26 08:30, matthew green wrote:
>>> This is just one more problem with non-IEEE floating point. Since this
>>> is a battle that cannot be won maybe I should put the dust of the
>>> "Emulate IEEE floating point" stuff I once worked on.  Must read up on
>>> the IEEE 754 standard first though.
>>
>> i wouldn't hate this. :-)
> 
> I'm not convinced. Starting to do all FP math in software will be 
> costly, on a machine that is already suffering heavly with performance 
> issues.
Actually, it is possible to avoid that :-)
It should be possible to do all normal math using F- and G-floats + some 
extra instructions, with only the corner cases needed to be handled 
separately.  The only violation would be in rounding in special cases.

> 
>> it is one of the more annoying, common, problems when trying to
>> build modern software on vax.
> 
> True. Sadly, most of the time it isn't really an issue with the actual 
> software as such, but either a problem with tests, or an expectation of 
> Inf and/or specific forms of NaN existing on the machine. Tests are hard 
> to fix, but most of the time the code that use Inf/NaN will work just 
> fine by changing it to something that exists on a VAX.
> 
A few extra instructions do not cause any harm in the common case.

-- Ragge