4 ms·
Aren't pointers pretty much universally 64 bits, except for some old or esoteric machines? And why would you not be able to treat one as an integer? Are there
by ColonelPhantom 3y ago
Aren't pointers pretty much universally 64 bits, except for some old or esoteric machines?
And why would you not be able to treat one as an integer? Are there any examples of such ISAs?
Finally, floating point formats do differ, but that shouldn't affect anything except precision and binary format. Also I'm pretty sure "float" is standard IEEE 32 bit and "double" is standard 64 bit, with predefined exponent/mantissa sizes. The only thing that could differ between arches is endianness, and by far most ISAs have settled on little endian.
- gpderetta 3y agox86 is hardly esoteric. New software for it is being published today.
- ColonelPhantom 3y agox86_32 counts as an old machine (the most recent CPU being the first generation Intel Atom). It's being dropped left and right in favour of only supporting 64-bit machines (x86_64, aarch64, maybe RV64).
- gpderetta 3y agoCPUs shipped by intel today still support (non exclusively) x86-32. All major OSs (except for MacOS I guess) support running 32bit code along side 64bit code. New 32 bit binaries are created every day. It is hardly legacy yet. Separately, there is also the x32 ABI, although that hasn't really gained any traction.