mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 06:49:16 +02:00
* changed all alignment parameters in the temp manager to shortint
git-svn-id: branches/hlcgllvm@28489 -
This commit is contained in:
parent
dd733bd5b5
commit
9880b53242
@ -37,7 +37,7 @@ unit tgcpu;
|
|||||||
|
|
||||||
ttgi8086 = class(ttgobj)
|
ttgi8086 = class(ttgobj)
|
||||||
protected
|
protected
|
||||||
procedure alloctemp(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference);override;
|
procedure alloctemp(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference);override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -47,7 +47,7 @@ uses
|
|||||||
|
|
||||||
{ ttgi8086 }
|
{ ttgi8086 }
|
||||||
|
|
||||||
procedure ttgi8086.alloctemp(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference);
|
procedure ttgi8086.alloctemp(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ref.segment:=NR_SS;
|
ref.segment:=NR_SS;
|
||||||
|
@ -42,7 +42,7 @@ unit tgcpu;
|
|||||||
protected
|
protected
|
||||||
procedure getimplicitobjtemp(list: TAsmList; def: tdef; temptype: ttemptype; out ref: treference);
|
procedure getimplicitobjtemp(list: TAsmList; def: tdef; temptype: ttemptype; out ref: treference);
|
||||||
function getifspecialtemp(list: TAsmList; def: tdef; forcesize: asizeint; temptype: ttemptype; out ref: treference): boolean;
|
function getifspecialtemp(list: TAsmList; def: tdef; forcesize: asizeint; temptype: ttemptype; out ref: treference): boolean;
|
||||||
procedure alloctemp(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference); override;
|
procedure alloctemp(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference); override;
|
||||||
public
|
public
|
||||||
procedure setfirsttemp(l : asizeint); override;
|
procedure setfirsttemp(l : asizeint); override;
|
||||||
procedure getlocal(list: TAsmList; size: asizeint; alignment: shortint; def: tdef; var ref: treference); override;
|
procedure getlocal(list: TAsmList; size: asizeint; alignment: shortint; def: tdef; var ref: treference); override;
|
||||||
@ -215,7 +215,7 @@ unit tgcpu;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure ttgjvm.alloctemp(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference);
|
procedure ttgjvm.alloctemp(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference);
|
||||||
begin
|
begin
|
||||||
{ the JVM only supports 1 slot (= 4 bytes in FPC) and 2 slot (= 8 bytes in
|
{ the JVM only supports 1 slot (= 4 bytes in FPC) and 2 slot (= 8 bytes in
|
||||||
FPC) temps on the stack. double and int64 are 2 slots, the rest is one slot.
|
FPC) temps on the stack. double and int64 are 2 slots, the rest is one slot.
|
||||||
|
@ -55,7 +55,7 @@ unit tgllvm;
|
|||||||
|
|
||||||
ttgllvm = class(ttgobj)
|
ttgllvm = class(ttgobj)
|
||||||
protected
|
protected
|
||||||
procedure alloctemp(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference); override;
|
procedure alloctemp(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference); override;
|
||||||
public
|
public
|
||||||
alloclist: tasmlist;
|
alloclist: tasmlist;
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ implementation
|
|||||||
|
|
||||||
{ ttgllvm }
|
{ ttgllvm }
|
||||||
|
|
||||||
procedure ttgllvm.alloctemp(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference);
|
procedure ttgllvm.alloctemp(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference);
|
||||||
var
|
var
|
||||||
tl: ptemprecord;
|
tl: ptemprecord;
|
||||||
oldfileinfo: tfileposinfo;
|
oldfileinfo: tfileposinfo;
|
||||||
|
@ -61,9 +61,9 @@ unit tgobj;
|
|||||||
protected
|
protected
|
||||||
{ contains all free temps using nextfree links }
|
{ contains all free temps using nextfree links }
|
||||||
tempfreelist : ptemprecord;
|
tempfreelist : ptemprecord;
|
||||||
procedure alloctemp(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference); virtual;
|
procedure alloctemp(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; def: tdef; fini: boolean; out ref: treference); virtual;
|
||||||
procedure freetemp(list: TAsmList; pos: asizeint; temptypes: ttemptypeset);virtual;
|
procedure freetemp(list: TAsmList; pos: asizeint; temptypes: ttemptypeset);virtual;
|
||||||
procedure gettempinternal(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; def: tdef; fini: boolean; out ref : treference);
|
procedure gettempinternal(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; def: tdef; fini: boolean; out ref : treference);
|
||||||
public
|
public
|
||||||
{ contains all temps }
|
{ contains all temps }
|
||||||
templist : ptemprecord;
|
templist : ptemprecord;
|
||||||
@ -86,7 +86,7 @@ unit tgobj;
|
|||||||
@param(l start offset where temps will start in stack)
|
@param(l start offset where temps will start in stack)
|
||||||
}
|
}
|
||||||
procedure setfirsttemp(l: asizeint); virtual;
|
procedure setfirsttemp(l: asizeint); virtual;
|
||||||
procedure setalignmentmismatch(l : longint); virtual;
|
procedure setalignmentmismatch(l: shortint); virtual;
|
||||||
|
|
||||||
{ version of gettemp that is compatible with hlcg-based targets;
|
{ version of gettemp that is compatible with hlcg-based targets;
|
||||||
always use in common code, only use gettemp in cgobj and
|
always use in common code, only use gettemp in cgobj and
|
||||||
@ -96,7 +96,7 @@ unit tgobj;
|
|||||||
don't have an inherent size (e.g., array of const) }
|
don't have an inherent size (e.g., array of const) }
|
||||||
procedure gethltemp(list: TAsmList; def: tdef; forcesize: asizeint; temptype: ttemptype; out ref: treference); virtual;
|
procedure gethltemp(list: TAsmList; def: tdef; forcesize: asizeint; temptype: ttemptype; out ref: treference); virtual;
|
||||||
procedure gethltempmanaged(list: TAsmList; def: tdef; temptype: ttemptype; out ref: treference); virtual;
|
procedure gethltempmanaged(list: TAsmList; def: tdef; temptype: ttemptype; out ref: treference); virtual;
|
||||||
procedure gettemp(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; out ref : treference);
|
procedure gettemp(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; out ref : treference);
|
||||||
procedure gettempmanaged(list: TAsmList; def:tdef;temptype:ttemptype;out ref : treference);
|
procedure gettempmanaged(list: TAsmList; def:tdef;temptype:ttemptype;out ref : treference);
|
||||||
procedure ungettemp(list: TAsmList; const ref : treference);
|
procedure ungettemp(list: TAsmList; const ref : treference);
|
||||||
|
|
||||||
@ -232,13 +232,13 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure ttgobj.setalignmentmismatch(l: longint);
|
procedure ttgobj.setalignmentmismatch(l: shortint);
|
||||||
begin
|
begin
|
||||||
alignmismatch:=l*direction;
|
alignmismatch:=l*direction;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure ttgobj.alloctemp(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; def :tdef; fini: boolean; out ref: treference);
|
procedure ttgobj.alloctemp(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; def :tdef; fini: boolean; out ref: treference);
|
||||||
var
|
var
|
||||||
tl,htl,
|
tl,htl,
|
||||||
bestslot,bestprev,
|
bestslot,bestprev,
|
||||||
@ -540,13 +540,13 @@ implementation
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure ttgobj.gettemp(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; out ref : treference);
|
procedure ttgobj.gettemp(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; out ref : treference);
|
||||||
begin
|
begin
|
||||||
gettempinternal(list,size,alignment,temptype,nil,false,ref);
|
gettempinternal(list,size,alignment,temptype,nil,false,ref);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure ttgobj.gettempinternal(list: TAsmList; size: asizeint; alignment: longint; temptype: ttemptype; def: tdef; fini: boolean; out ref : treference);
|
procedure ttgobj.gettempinternal(list: TAsmList; size: asizeint; alignment: shortint; temptype: ttemptype; def: tdef; fini: boolean; out ref : treference);
|
||||||
var
|
var
|
||||||
varalign : shortint;
|
varalign : shortint;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user