One specific reason why this might be hard is that pointer sizes are going to be different. Instead of a pointer taking up 32 bits, a pointer would now take up 64 bits.
That's a problem if the software somewhere shoehorns a pointer into an int
via a reinterpret_cast
in C++ (which may occur in some really low level code), and it happened to work because the size of an int
and a pointer were the same size. Basically, the code assumed a certain size for a pointer.
Another way that can bite back is if the code is littered with magic numbers like 4
instead of sizeof(void*)
, or 0xffffffff
instead of INT_MAX
or something similar.
There might not be a 64-bit version of a software if it depends on a library or a function that is not available in 64 bits. You can't have an application that is part 32 bits and 64 bits. For example, in Windows, there's a function called SetWindowLong
that can only accept 32-bits of data, so it's not very useful for 64-bit programs if a pointer needs to be passed to the function. That's why there's a function called SetWindowLongPtr
that can handle up to 64-bits in 64-bit programs and 32-bits in 32-bit programs.
Note that Internet Explorer runs on 32-bits by default even on 64-bit windows, because a huge majority of plugins for it are available only in 32-bits. A big example of this is the Adobe Flash Player, which is available only in 32-bits. So, apparently even for a big company like Adobe, porting for 64-bits may not always be trivial.
Bitshifting operations may be affected. For example, bit shifting 0x80000
left 10 times in 32 bits gives you 0x0
, but bit shifting 0x80000
left 10 times in 64 bits gives you 0x200000000
.
All that being said, there's no real technical reason why it's too difficult to port an application to 64-bits if the code was written well. The best case scenario is that a simple project reconfiguration and complete rebuild is all that's needed.
The cynical side of me say that companies use this as a way to implement planned obsolescence - force or encourage people to upgrade to/purchase the newest products!