News for hackers. Stuff that matters.
Re:A bit of background on compilers exploiting signed overflow by userbinator on Sunday May 08, 2016 @11:34AM (#11654426)
The other thing to consider is that "x86-64" or "amd64" is not really 64-bit. Operand sizes are 32 bits by default (except the addressing modes, which leads to this mess), and you can only use 64-bit widths with an extra prefix byte --- on each instruction. There are no 64-bit equivalents of some instructions. Compared to the 16-to-32-bit transition that happened with the 386, the 32-to-64 just does not seem anywhere near as well thought-out.

Then again, it makes sense to leave operand sizes at 32 bits, as otherwise code would be twice as big, with the accompanying consequences for caching etc.; in fact I'd be willing to bet that 4 billion representable values is more than a lot of applications would ever need to put in an int. Extending that to 64 bits is really for addressing and the other cases where that exponentially larger range is truly needed.

There are no comments on this comment yet.