S
Stephen Horne
That would work too, but would lose most of the advantages of 64-bit
code, especially direct access to more than 4 GiB of memory.
I'm not so sure that's as big an advantage as people think. Those
applications that need more than 4GB memory could probably work with
segmented memory quite easily. It's nowhere near as evil as back in
the days when a segment was 64K.
When weighed against all those compatibility issues hidden in old
libraries (pointers casted to/from that UINT32 type-alias, etc)...
You do still run into a few obvious problems with that. For example,
though it's hard to call it a binding requirement, there is language
in the standard saying that int should be the size suggested by the
architecture -- and it's at least open to argument that on 64-bit
Windows, that should be a 64-bit type (and yes, the solution I posted
earlier had exactly the same shortcoming).
Nah - the instruction set still comes in 8-bit chunks, I suspect, so
int should be 8 bits ;-)
The old how-many-bits-is-the-architecture hasn't had a simple answer
for a long time. Data register size doesn't match addressing width,
which doesn't match instruction granularity, which doesn't match bus
width...