Use a
long long
On the IA32 architecture, 64-bit integer (long long
) are implemented in using two 32-bit registers (eax and edx).
题
I am trying to make data structure for a 64 bit integer in a 32 bit architecture.
Any idea to do this will be appreciate .
struct make
{
int a;// how to make 64 bit integer in a 32 bit architecture.
}
NOTE : I have a question, Will a C program compiled on a 32 bit Intel processor execute successfully on a 32 bit AMD processor?
解决方案
Use a
long long
On the IA32 architecture, 64-bit integer (long long
) are implemented in using two 32-bit registers (eax and edx).
其他提示
The long long
datatype is usually 64 bits regardless of architecture.
Edit: with regard to your note, AMD and Intel processors use the same instruction set architectures. So, yes, a program compiled on an Intel chip should run on an AMD chip. (I assume you are talking about desktop cpus.)