[fpc-devel] Compiler limitations

Daniël Mantione daniel.mantione at freepascal.org
Fri May 9 23:01:45 CEST 2008



Op Fri, 9 May 2008, schreef Florian Klaempfl:

> Vincent Snijders schrieb:
>> Florian Klaempfl schreef:
>>> Miklos Cserzo schrieb:
>>>> =

>>>> Hi Folks,
>>>> =

>>>> according the documentation "Arrays are limited to 2 GBytes in size in =

>>>> the default processor mode." Is there another mode allowing bigger =

>>>> arrays?
>>> =

>>> 64 Bit mode/compiler.
>>> =

>> =

>> Except for darwin.
>> =

>> Except it doesn't work:
>> http://www.freepascal.org/testsuite/cgi-bin/testsuite.cgi?action=3D3&run=
1id=3D21737&testfileid=3D2417 =

>
> This is operation system dependent also if you can declare static data =

> structures of this size. Things like
>
> type
>  ta =3D array[0..$fffffffff] of byte;
> var
>  p : ^ta;
>
> begin
>  new(p);
> end.
>
> should work e.g. on linux.

Yes, this would work, but wrapping it in a record and adding a field to it =

might not work. The reason is that the x86_64 still uses singed 32-bit =

displacements in its operands. To support this, a different code =

generation is needed, which we don't have.

Many compilers have an mcmodel switch. FPC's x86_64 code generation =

compares to mcmodel=3Dsmall.

Dani=EBl


More information about the fpc-devel mailing list