Hi Eliot & all!
I have a suggestion for the immediate value encodings:

Basically, the 3 datatypes which could use as much precision as possible are:
- Signed/unsigned 64bit ints
- Doubles

All others usually fit well within the remaining size.

So why don't we either:

Use 2 LSB bits for three aforementioned, either:
01 - 62bit Signed int
11 - 62bit Unsigned int
10 - 62bit Double

or:
X1 - 63bit Signed int
10 - 62bit Double

Then use the 3rd "tag" bit [100] as a marker for small immediate values which fit entirely in the remaining bits, either with N tag field bits
(say, 5):
[32 data bits][16 fillers][00001][100] - Character (only 26 or so data bits needed for all unicode codepoints)
[32 data bits][16 fillers][00010][100] - Float
[48 data bits][00011][100] - Imaginary immediat needing 48 bits

 or separate bits:
[32 data bits][10*][100] - Float
[26 data bits][10*][100] - Character

AFAICT,this scheme would use the same amount of bites for tagging as a pure lookup table, give more precision for the types that need it, make it viable to include many immediate values with lesser size requirements, as well as not intruding on the valid oops ending in [000] with an 8-byte alignment.

Cheers,
Henry

Reply via email to