mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 04:29:17 +02:00
* fix incorrect generation of huge static arrays on 64 bit systems; however, GAS only supports 2^31-1 sized ones
git-svn-id: trunk@6382 -
This commit is contained in:
parent
36cb039a21
commit
635117218e
@ -369,9 +369,9 @@ interface
|
|||||||
tai_datablock = class(tailineinfo)
|
tai_datablock = class(tailineinfo)
|
||||||
is_global : boolean;
|
is_global : boolean;
|
||||||
sym : tasmsymbol;
|
sym : tasmsymbol;
|
||||||
size : longint;
|
size : aint;
|
||||||
constructor Create(const _name : string;_size : longint);
|
constructor Create(const _name : string;_size : aint);
|
||||||
constructor Create_global(const _name : string;_size : longint);
|
constructor Create_global(const _name : string;_size : aint);
|
||||||
constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
|
constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
|
||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
procedure derefimpl;override;
|
procedure derefimpl;override;
|
||||||
@ -854,7 +854,7 @@ implementation
|
|||||||
TAI_DATABLOCK
|
TAI_DATABLOCK
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tai_datablock.Create(const _name : string;_size : longint);
|
constructor tai_datablock.Create(const _name : string;_size : aint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
@ -862,20 +862,20 @@ implementation
|
|||||||
sym:=current_asmdata.DefineAsmSymbol(_name,AB_LOCAL,AT_DATA);
|
sym:=current_asmdata.DefineAsmSymbol(_name,AB_LOCAL,AT_DATA);
|
||||||
{ keep things aligned }
|
{ keep things aligned }
|
||||||
if _size<=0 then
|
if _size<=0 then
|
||||||
_size:=4;
|
_size:=sizeof(aint);
|
||||||
size:=_size;
|
size:=_size;
|
||||||
is_global:=false;
|
is_global:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tai_datablock.Create_global(const _name : string;_size : longint);
|
constructor tai_datablock.Create_global(const _name : string;_size : aint);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
typ:=ait_datablock;
|
typ:=ait_datablock;
|
||||||
sym:=current_asmdata.DefineAsmSymbol(_name,AB_GLOBAL,AT_DATA);
|
sym:=current_asmdata.DefineAsmSymbol(_name,AB_GLOBAL,AT_DATA);
|
||||||
{ keep things aligned }
|
{ keep things aligned }
|
||||||
if _size<=0 then
|
if _size<=0 then
|
||||||
_size:=4;
|
_size:=sizeof(aint);
|
||||||
size:=_size;
|
size:=_size;
|
||||||
is_global:=true;
|
is_global:=true;
|
||||||
end;
|
end;
|
||||||
@ -885,7 +885,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
sym:=ppufile.getasmsymbol;
|
sym:=ppufile.getasmsymbol;
|
||||||
size:=ppufile.getlongint;
|
size:=ppufile.getaint;
|
||||||
is_global:=boolean(ppufile.getbyte);
|
is_global:=boolean(ppufile.getbyte);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -894,7 +894,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
inherited ppuwrite(ppufile);
|
inherited ppuwrite(ppufile);
|
||||||
ppufile.putasmsymbol(sym);
|
ppufile.putasmsymbol(sym);
|
||||||
ppufile.putlongint(size);
|
ppufile.putaint(size);
|
||||||
ppufile.putbyte(byte(is_global));
|
ppufile.putbyte(byte(is_global));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ interface
|
|||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
procedure buildderef;override;
|
procedure buildderef;override;
|
||||||
procedure deref;override;
|
procedure deref;override;
|
||||||
function getsize : longint;
|
function getsize : aint;
|
||||||
function getpackedbitsize : longint;
|
function getpackedbitsize : longint;
|
||||||
function is_regvar(refpara: boolean):boolean;
|
function is_regvar(refpara: boolean):boolean;
|
||||||
procedure trigger_notifications(what:Tnotification_flag);
|
procedure trigger_notifications(what:Tnotification_flag);
|
||||||
@ -231,7 +231,7 @@ interface
|
|||||||
constructor create(const n : string);
|
constructor create(const n : string);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
function getsize : longint;
|
function getsize : aint;
|
||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
procedure buildderef;override;
|
procedure buildderef;override;
|
||||||
procedure deref;override;
|
procedure deref;override;
|
||||||
@ -880,7 +880,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function tpropertysym.getsize : longint;
|
function tpropertysym.getsize : aint;
|
||||||
begin
|
begin
|
||||||
getsize:=0;
|
getsize:=0;
|
||||||
end;
|
end;
|
||||||
@ -971,7 +971,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function tabstractvarsym.getsize : longint;
|
function tabstractvarsym.getsize : aint;
|
||||||
begin
|
begin
|
||||||
if assigned(vardef) and
|
if assigned(vardef) and
|
||||||
((vardef.typ<>arraydef) or
|
((vardef.typ<>arraydef) or
|
||||||
|
Loading…
Reference in New Issue
Block a user