9 ms·
> That's not how it works. The x86-64 ISA requires these "top" bits to be properly sign extended when actually accessing addresses. On Coffee Lake no more than
by tialaramex 5y ago
> That's not how it works. The x86-64 ISA requires these "top" bits to be properly sign extended when actually accessing addresses.
On Coffee Lake no more than 48 bits of the virtual address are "real". If I steal ten of the 64 bits from the top, all the actual address information is preserved and I've lost nothing. My compiler works just fine.
On Ice Lake up to 57 bits of the virtual address are "real". Since I'm stealing ten of the 64 bits from the top, I only have 54 bits left, so 3 significant bits were dropped and I don't have them any more. Sign-extending the wrong value won't magically make it into the right value.
- klodolph 5y agoYes—and my concern is that old binaries will suddenly stop working on newer hardware. This has happened before! The whole reason the top bits are sign-extended in the first place is to discourage these kinds of shenanigans. I remember the pain of switching 24-bit to 32-bit on M68K Macs.