* 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:
tom_at_work 2007-02-08 22:11:27 +00:00
parent 36cb039a21
commit 635117218e
2 changed files with 13 additions and 13 deletions

View File

@ -369,9 +369,9 @@ interface
tai_datablock = class(tailineinfo)
is_global : boolean;
sym : tasmsymbol;
size : longint;
constructor Create(const _name : string;_size : longint);
constructor Create_global(const _name : string;_size : longint);
size : aint;
constructor Create(const _name : string;_size : aint);
constructor Create_global(const _name : string;_size : aint);
constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure derefimpl;override;
@ -854,7 +854,7 @@ implementation
TAI_DATABLOCK
****************************************************************************}
constructor tai_datablock.Create(const _name : string;_size : longint);
constructor tai_datablock.Create(const _name : string;_size : aint);
begin
inherited Create;
@ -862,20 +862,20 @@ implementation
sym:=current_asmdata.DefineAsmSymbol(_name,AB_LOCAL,AT_DATA);
{ keep things aligned }
if _size<=0 then
_size:=4;
_size:=sizeof(aint);
size:=_size;
is_global:=false;
end;
constructor tai_datablock.Create_global(const _name : string;_size : longint);
constructor tai_datablock.Create_global(const _name : string;_size : aint);
begin
inherited Create;
typ:=ait_datablock;
sym:=current_asmdata.DefineAsmSymbol(_name,AB_GLOBAL,AT_DATA);
{ keep things aligned }
if _size<=0 then
_size:=4;
_size:=sizeof(aint);
size:=_size;
is_global:=true;
end;
@ -885,7 +885,7 @@ implementation
begin
inherited Create;
sym:=ppufile.getasmsymbol;
size:=ppufile.getlongint;
size:=ppufile.getaint;
is_global:=boolean(ppufile.getbyte);
end;
@ -894,7 +894,7 @@ implementation
begin
inherited ppuwrite(ppufile);
ppufile.putasmsymbol(sym);
ppufile.putlongint(size);
ppufile.putaint(size);
ppufile.putbyte(byte(is_global));
end;

View File

@ -129,7 +129,7 @@ interface
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure deref;override;
function getsize : longint;
function getsize : aint;
function getpackedbitsize : longint;
function is_regvar(refpara: boolean):boolean;
procedure trigger_notifications(what:Tnotification_flag);
@ -231,7 +231,7 @@ interface
constructor create(const n : string);
destructor destroy;override;
constructor ppuload(ppufile:tcompilerppufile);
function getsize : longint;
function getsize : aint;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure deref;override;
@ -880,7 +880,7 @@ implementation
end;
function tpropertysym.getsize : longint;
function tpropertysym.getsize : aint;
begin
getsize:=0;
end;
@ -971,7 +971,7 @@ implementation
end;
function tabstractvarsym.getsize : longint;
function tabstractvarsym.getsize : aint;
begin
if assigned(vardef) and
((vardef.typ<>arraydef) or