lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, 25 Feb 2011, Peter Cawley wrote:
> 2011/2/24 Yura Sokolov <funny.falcon@gmail.com>:
> > Well, x64 at the moment uses only 48 bits for addresses.
> >
> > 1bit for a sign + 11bits for mantis + 1bit for quiet NaN + 48 bits for an
> > address = 61bit

You mean 11 bits for the exponent :-)

> > So that there is 3bits for tagging.
> >
> > Currently Lua uses 13 different tag values, so that it would be tricky to
> > pack them into three bits :)
>
> If you're willing to pay the price of an extra indirection, you might
> be able to get away with using a single tag value for all GC types, as
> the GC header stores the tag value.

Or steal another three bits from the bottom of the pointer...

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Faeroes, South-east Iceland: Southwesterly 7 to severe gale 9, occasionally
storm 10 at first. High or very high. Rain or squally showers. Moderate or
poor.