Floats in self.

Hugh Emberson hugh at cosc.canterbury.ac.nz
Fri Mar 25 18:59:41 UTC 1994

I have just been re-reading the OOPSLA'89 paper on Self and in section
3.3 it says that floats are immediates with a tag of (binary) 10 in
the least significant two bits.

I was wondering what happens when a float is tagged.  Is the mantissa
truncated and then tagged:
	float x = ...
	tagged_x = ((unsigned) x & ~0x3) | 0x2;

or is the mantissa rounded so that it only uses the 21 bits
and then tagged:

	tagged_x = round_to_21(x) | 0x2;

or does something else happen?

How about un-tagging, what happens then?


More information about the Self-interest mailing list