Subject: Re: Problem and fix for systat/top/ps
To: Christos Zoulas <christos@zoulas.com>
From: Johnny Billquist <bqt@softjar.se>
List: port-vax
Date: 03/14/2007 15:28:03
Christos Zoulas wrote:
> On Mar 14, 12:12pm, bqt@softjar.se (Johnny Billquist) wrote:
> -- Subject: Re: Problem and fix for systat/top/ps
> 
> | > In real.c if (exp == 0) in all the decode_vax_?() functions don't put
> | > anything in the r-> stuff, they just leave it 0'ed. Is that ok?
> | > I understand exp == 0 means really -128, but...
> | 
> | On the VAX, if exp == 0 and sign == 0, then the value is to be taken as 
> | literally zero, no matter what the other bits are.
> | If exp == 0, and sign == 1, it's a NaN.
> | 
> | So I'd say that gcc is probably doing the right thing here. (I don't 
> | think they every play around with NaNs...)
> 
> So it should be setting the "cl" member differently depending on the
> value of the sign, but it is not?

Having looked a bit more, I'd say yes. Also, the encode functions don't 
code NaNs the way DEC is saying either.

See http://h71000.www7.hp.com/doc/73final/4515/4515pro_013.html for a 
full description of the FP format of the VAX.

I wonder if they have chosen another representation of NaN on a VAX? 
They seem to code a NaN the same way they code an INF, which don't even 
exist as a representation on the VAX.

Weird...

	Johnny