[fpc-devel] 64 Bit / 32 Bit

Daniël Mantione daniel.mantione at freepascal.org
Tue Oct 2 09:52:59 CEST 2007



Op Tue, 2 Oct 2007, schreef Michael Schnell:

> Hi experts ?
> 
> I suppose that FPC can create 64 bit (IA-32/64) code. Is that correct  ? Linux
> and/or Windows ?

FPC can create IA32 and AMD64 code, not IA64 node.
 
> Can this be done by "cross"-compiling on a 32 Bit PC ? Linux and/or Windows ?

Yes.

> Does a 64 Bit FPC generated program need to run on a 64 Bit OS ? (Linux and/or
> Windows ?) or can it just use 64 Bit instructions internally ?

A 64-bit OS is necessary.

> Does / can a 64 Bit FPC generated program include 32 Bit code as well so that
> it can run on a 32 Bit CPU ?

No.

> If any "No" would that be desirable ?

No, because if the program can run on 32-bit, the only adavtage to go for 
64-bit is speed. But, FPC generates currently slower 64-bit executables 
than 32-bit executables.

Therefore, if your program can run in 2 or 4GB, it makes more sense to use 
a 32-bit version on a 64-bit machine.

Daniël


More information about the fpc-devel mailing list