Home > Software design >  It's possible to make a source code 32 or 64 bit only?
It's possible to make a source code 32 or 64 bit only?

Time:12-01

As my understanding, I can compile my C code into 32bit binary or 64bit easily, but, some open source projects sais "We don't support 32bit CPU", so why? what makes the code source 64bit only?

I already checked many topics, questions & responses, but all are related to the OS, CPU, and the compiled binary files. While my question is related to the code source itself.

CodePudding user response:

The instruction sets of CPUs will vary, and the instructions available will vary depending on the mode it's running in. The program might rely on larger integers provided in 64-bit mode, or it might have assembler that uses 64-bit instructions.

The different modes of operation also have different memory models. For example, a 32-bit Windows program can address 4 GiB of memory (a huge chunk of which it can't even use). On the other hand, a 64-bit Windows program can access virtually unlimited memory.

  • Related