+ Alignement field added to TParaLocation (=4 as 32 bits archs)

This commit is contained in:
mazen 2003-10-08 14:11:36 +00:00
parent 25dc5f7e80
commit 7668192be0
4 changed files with 23 additions and 19 deletions

View File

@ -297,13 +297,8 @@ uses
LOC_REFERENCE,LOC_REGISTER or LOC_FPUREGISTER LOC_REFERENCE,LOC_REGISTER or LOC_FPUREGISTER
} }
loc : TCGLoc; loc : TCGLoc;
{ The stack pointer must be decreased by this value before {Word alignment on stack 4 --> 32 bit}
the parameter is copied to the given destination. Alignment:Byte;
This allows to "encode" pushes with tparalocation.
On the PowerPC, this field is unsed but it is there
because several generic code accesses it.
}
sp_fixup : longint;
case TCGLoc of case TCGLoc of
LOC_REFERENCE : (reference : tparareference); LOC_REFERENCE : (reference : tparareference);
LOC_FPUREGISTER, LOC_CFPUREGISTER, LOC_MMREGISTER, LOC_CMMREGISTER, LOC_FPUREGISTER, LOC_CFPUREGISTER, LOC_MMREGISTER, LOC_CMMREGISTER,
@ -730,7 +725,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.69 2003-10-01 20:34:49 peter Revision 1.70 2003-10-08 14:11:36 mazen
+ Alignement field added to TParaLocation (=4 as 32 bits archs)
Revision 1.69 2003/10/01 20:34:49 peter
* procinfo unit contains tprocinfo * procinfo unit contains tprocinfo
* cginfo renamed to cgbase * cginfo renamed to cgbase
* moved cgmessage to verbose * moved cgmessage to verbose

View File

@ -237,6 +237,7 @@ unit cpupara;
end; end;
{ make sure all alignment bytes are 0 as well } { make sure all alignment bytes are 0 as well }
fillchar(paraloc,sizeof(paraloc),0); fillchar(paraloc,sizeof(paraloc),0);
paraloc.Alignment:=4;
case loc of case loc of
LOC_REGISTER: LOC_REGISTER:
begin begin
@ -357,7 +358,10 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.47 2003-10-01 20:34:49 peter Revision 1.48 2003-10-08 14:11:36 mazen
+ Alignement field added to TParaLocation (=4 as 32 bits archs)
Revision 1.47 2003/10/01 20:34:49 peter
* procinfo unit contains tprocinfo * procinfo unit contains tprocinfo
* cginfo renamed to cgbase * cginfo renamed to cgbase
* moved cgmessage to verbose * moved cgmessage to verbose

View File

@ -239,13 +239,8 @@ type
LOC_REFERENCE,LOC_REGISTER or LOC_FPUREGISTER LOC_REFERENCE,LOC_REGISTER or LOC_FPUREGISTER
} }
loc : TCGLoc; loc : TCGLoc;
{ The stack pointer must be decreased by this value before {Word alignment on stack 4 --> 32 bit}
the parameter is copied to the given destination. Alignment:Byte;
This allows to "encode" pushes with tparalocation.
On the PowerPC, this field is unsed but it is there
because several generic code accesses it.
}
sp_fixup : longint;
case TCGLoc of case TCGLoc of
LOC_REFERENCE : (reference : tparareference; low_in_reg: boolean; lowreg : tregister); LOC_REFERENCE : (reference : tparareference; low_in_reg: boolean; lowreg : tregister);
LOC_FPUREGISTER, LOC_CFPUREGISTER, LOC_MMREGISTER, LOC_CMMREGISTER, LOC_FPUREGISTER, LOC_CFPUREGISTER, LOC_MMREGISTER, LOC_CMMREGISTER,
@ -605,7 +600,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.52 2003-10-01 20:34:50 peter Revision 1.53 2003-10-08 14:11:36 mazen
+ Alignement field added to TParaLocation (=4 as 32 bits archs)
Revision 1.52 2003/10/01 20:34:50 peter
* procinfo unit contains tprocinfo * procinfo unit contains tprocinfo
* cginfo renamed to cgbase * cginfo renamed to cgbase
* moved cgmessage to verbose * moved cgmessage to verbose

View File

@ -159,7 +159,8 @@ implementation
hp:=TParaItem(p.para.First); hp:=TParaItem(p.para.First);
while assigned(hp) do while assigned(hp) do
begin begin
fillchar(paraloc,sizeof(tparalocation),0); fillchar(paraloc,sizeof(paraloc),0);
paraloc.Alignment:=4;
if push_addr_param(hp.paratyp,hp.paratype.def,p.proccalloption) or (hp.paratyp in [vs_var,vs_out]) then if push_addr_param(hp.paratyp,hp.paratype.def,p.proccalloption) or (hp.paratyp in [vs_var,vs_out]) then
paraloc.size:=OS_ADDR paraloc.size:=OS_ADDR
else else
@ -293,7 +294,10 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.31 2003-10-01 20:34:50 peter Revision 1.32 2003-10-08 14:11:36 mazen
+ Alignement field added to TParaLocation (=4 as 32 bits archs)
Revision 1.31 2003/10/01 20:34:50 peter
* procinfo unit contains tprocinfo * procinfo unit contains tprocinfo
* cginfo renamed to cgbase * cginfo renamed to cgbase
* moved cgmessage to verbose * moved cgmessage to verbose