[fpc-devel] Compiler limitations
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
>>> 64 Bit mode/compiler.
>> Except for darwin.
>> Except it doesn't work:
> This is operation system dependent also if you can declare static data
> structures of this size. Things like
> ta = array[0..$fffffffff] of byte;
> p : ^ta;
> 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=small.
More information about the fpc-devel