> for instance, although the range of subtraction is theoretically > -2^64+1 to 2^64-1, amd64 can only address 48 bits of memory > (currently) despite using 64 bits to represent addresses. as long > as virtual addresses in the system aren't exabytes apart, this > shouldn't result in undefined behavior in practice.
Unfortunately AMD64 VM is a hack. The 2^48 addressable bytes aren't contiguous! 2^47 of them go up from 0 and the other 2^47 of them go down from (64-bit) -1. See: https://en.wikipedia.org/wiki/X86-64#Canonical_form_addresses Dave Eckhardt