Scott Moore wrote:
To reach 32 bit operations in AMD 64, you have to use a mode prefix (from 64 bit mode). Hence, there is an instruction length penalty.
That's already bad. Even worse if it can only read/write 64 bit words, so in particular 32 bit writes get quite cumbersome. (Do you know if this is so?)
In any case, the ISO 7185 standard is clear: The range of integer is -maxint to maxint, and all calculations shall occur in that range, ie., integer is the maximum range type on any system. The program is supposed to use maxint to adjust its specific behavior, as required, or specifically declare a subrange, perhaps to give a compile time message about it being larger than the target is capable of.
That's fulfilled whatever me make `Integer' to be, since `MaxInt' will always refer to this particular type. The longer types are disabled in standard modes (and they have `MaxLongInt' etc.).
By the way, the AMD ABI or calling/sizing convention which gcc is based on, and requires ints remain 32 bits, violates the standard for C as well.
What does it demand? (I'm not really an expert on C standards. ;-)
Frank