[Vm-dev] Re: [squeak-dev] Spur with Immediate Floating Point Support implies a break

Levente Uzonyi leves at elte.hu
Thu Dec 4 03:18:18 UTC 2014


Hi Eliot,

On Wed, 3 Dec 2014, Eliot Miranda wrote:

> SmallFloat64 is an immediate tagged representation, like SmallInteger, so
> they fit within an object pointer and have no header.  In 64-bit Spur there
> is a 3-bit tag, leaving 61 bits.  SmallFoat64 steals 3 bits from the 11-bit
> exponent to donate to the tags, representing a full double precision
> floating-point value that is restricted to the ~ +/-10^+/-38 range.
> There's really no practical way to shoe-horn a usable range of 64-bit float
> into a 30-bit value.  Its possible but so few values would fit that the
> effort would be counter-productive.  DOes this make sense now?

I didn't mean to use 30-bit values. I meant to use the same 61-bit 
representation as with the 64-bit Spur.
The object header is 64 bits long in both 32-bit and 64-bit Spur, right?
If yes, then why is it not possible to detect the tag of SmallFloat64 in a 
32-bit VM, and treat the object as immediate?

About the "normalizer" primitive, I think it would be better than using 
an arithmetic operation, because - if i'm not mistaken - it's possible to 
convert the object in-place instead of creating a new one.

Levente


More information about the Squeak-dev mailing list