2 ms·
> In contrast, there is no way to use 64-bit registers in 32-bit code despite there being reservations in the existing instruction set that would've made it pos
by nnx 12y ago
> In contrast, there is no way to use 64-bit registers in 32-bit code despite there being reservations in the existing instruction set that would've made it possible.
Isn't it what the X32 ABI do?
https://en.wikipedia.org/wiki/X32_ABI https://en.wikipedia.org/wiki/X32_ABI
- ANTSANTS 12y agoNo, x32 is still long mode (64-bit), it's just an ABI that restricts all memory allocations to 4 gigabytes of address space so that 4-byte pointers can safely be used instead of 8-byte ones. You can get a similar effect by manually mmaping memory into the lower parts of the address space even in a regular 64-bit program (luajit relies on this), but you can't stop malloc, the kernel, other libraries, etc. from using the rest of the address space. On x86 CPUs since the the 386, you don't need a hack to make 32-bit mode look like a 16-bit mode, you literally can access the full 32-bit registers in 16-bit modes with an operand size prefix.