RAA: clean up the RAA infrastructure, make it support larger indicies
commit903ea5485765f4f07b9535296b1dfca3775630c7
authorH. Peter Anvin <hpa@linux.intel.com>
Fri, 15 Jun 2018 02:21:12 +0000 (14 19:21 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 15 Jun 2018 03:23:49 +0000 (14 20:23 -0700)
treeef61ddddaa5f7047e9f0e48e8f4de41c74c9c62f
parent9401f81416f3d70e66539daf977887447b15ab46
RAA: clean up the RAA infrastructure, make it support larger indicies

Make the RAA infrastructure a bit cleaner, make it support 64-bit
indicies, and reduce the memory overhead of a sparse or small RAA --
the old code would allocate a *minimum* of 256K for each RAA.  The new
code reduces that to 16K, and will not mandatorily allocate an entry
in the zero position.

The new shift, 11, was chosen so that a 32-bit RAA value will need 3
layers and a 64-bit value 6 layers, without excessive waste.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
include/raa.h
nasmlib/raa.c