On Friday 24 September 2004 11:18 am, Peter Colson wrote:
In cvm.c, the function 'ReadLong' (where long presumably means an
integral type) is assumed to be an Int64
taken from the same union above that only contains Int32 integrals:
Int64 quantities may occupy 1 or 2 stack words, depending upon the
platform
size/alignment rules. Adding a "ILInt64" field to the CVMWord union
would
cause stack slots to expand to 64 bits on all platforms, wasting space
on
those (like x86) that don't need 64-bit alignment of 64-bit values.
The "IL_BEST_ALIGNMENT" macro will normally pad the union to the
correct
boundary to prevent mis-aligned accesses on picky platforms.
I don't understand the Int32/Int64 mismatch here?
The "ReadLong" function is not taking a pointer to 1 stack word. It
is taking
a pointer to the stack word containing the beginning of the value.
The value
may extend into the following stack words on some platforms.