mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 19:39:31 +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)
|
||||
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;
|
||||
|
||||
implementation
|
||||
@ -47,7 +47,7 @@ uses
|
||||
|
||||
{ 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
|
||||
inherited;
|
||||
ref.segment:=NR_SS;
|
||||
|
@ -42,7 +42,7 @@ unit tgcpu;
|
||||
protected
|
||||
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;
|
||||
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
|
||||
procedure setfirsttemp(l : asizeint); override;
|
||||
procedure getlocal(list: TAsmList; size: asizeint; alignment: shortint; def: tdef; var ref: treference); override;
|
||||
@ -215,7 +215,7 @@ unit tgcpu;
|
||||
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
|
||||
{ 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.
|
||||
|
@ -55,7 +55,7 @@ unit tgllvm;
|
||||
|
||||
ttgllvm = class(ttgobj)
|
||||
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
|
||||
alloclist: tasmlist;
|
||||
|
||||
@ -82,7 +82,7 @@ implementation
|
||||
|
||||
{ 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
|
||||
tl: ptemprecord;
|
||||
oldfileinfo: tfileposinfo;
|
||||
|
@ -61,9 +61,9 @@ unit tgobj;
|
||||
protected
|
||||
{ contains all free temps using nextfree links }
|
||||
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 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
|
||||
{ contains all temps }
|
||||
templist : ptemprecord;
|
||||
@ -86,7 +86,7 @@ unit tgobj;
|
||||
@param(l start offset where temps will start in stack)
|
||||
}
|
||||
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;
|
||||
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) }
|
||||
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 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 ungettemp(list: TAsmList; const ref : treference);
|
||||
|
||||
@ -232,13 +232,13 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
procedure ttgobj.setalignmentmismatch(l: longint);
|
||||
procedure ttgobj.setalignmentmismatch(l: shortint);
|
||||
begin
|
||||
alignmismatch:=l*direction;
|
||||
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
|
||||
tl,htl,
|
||||
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
|
||||
gettempinternal(list,size,alignment,temptype,nil,false,ref);
|
||||
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
|
||||
varalign : shortint;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user