mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 02:29:19 +02:00
* formatting
This commit is contained in:
parent
5e53c7fd04
commit
74bad92e4d
@ -325,12 +325,15 @@ implementation
|
|||||||
{ have we ensured that the next parameter location will be aligned to the
|
{ have we ensured that the next parameter location will be aligned to the
|
||||||
next 8 byte boundary? }
|
next 8 byte boundary? }
|
||||||
paraaligned:=false;
|
paraaligned:=false;
|
||||||
if push_addr_param(varspez, paradef, p.proccalloption) then begin
|
if push_addr_param(varspez, paradef, p.proccalloption) then
|
||||||
|
begin
|
||||||
paradef := cpointerdef.getreusable_no_free(paradef);
|
paradef := cpointerdef.getreusable_no_free(paradef);
|
||||||
loc := LOC_REGISTER;
|
loc := LOC_REGISTER;
|
||||||
paracgsize := OS_ADDR;
|
paracgsize := OS_ADDR;
|
||||||
paralen := tcgsize2size[OS_ADDR];
|
paralen := tcgsize2size[OS_ADDR];
|
||||||
end else begin
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
if not is_special_array(paradef) then
|
if not is_special_array(paradef) then
|
||||||
paralen := paradef.size
|
paralen := paradef.size
|
||||||
else
|
else
|
||||||
@ -367,7 +370,8 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ patch FPU values into integer registers if we are processing varargs }
|
{ patch FPU values into integer registers if we are processing varargs }
|
||||||
if (isVararg) and (paradef.typ = floatdef) then begin
|
if (isVararg) and (paradef.typ = floatdef) then
|
||||||
|
begin
|
||||||
loc := LOC_REGISTER;
|
loc := LOC_REGISTER;
|
||||||
if paracgsize = OS_F64 then
|
if paracgsize = OS_F64 then
|
||||||
paracgsize := OS_64
|
paracgsize := OS_64
|
||||||
@ -375,17 +379,18 @@ implementation
|
|||||||
paracgsize := OS_32;
|
paracgsize := OS_32;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
para.alignment := std_param_align;
|
para.alignment := std_param_align;
|
||||||
para.size := paracgsize;
|
para.size := paracgsize;
|
||||||
para.intsize := paralen;
|
para.intsize := paralen;
|
||||||
para.def := paradef;
|
para.def := paradef;
|
||||||
if (paralen = 0) then
|
if (paralen = 0) then
|
||||||
if (paradef.typ = recorddef) then begin
|
if (paradef.typ = recorddef) then
|
||||||
|
begin
|
||||||
paraloc := para.add_location;
|
paraloc := para.add_location;
|
||||||
paraloc^.loc := LOC_VOID;
|
paraloc^.loc := LOC_VOID;
|
||||||
end else
|
end
|
||||||
internalerror(2005011310);
|
else
|
||||||
|
internalerror(2024121401);
|
||||||
if not assigned(alllocdef) then
|
if not assigned(alllocdef) then
|
||||||
locdef:=paradef
|
locdef:=paradef
|
||||||
else
|
else
|
||||||
@ -410,7 +415,8 @@ implementation
|
|||||||
is always passed on the stack. }
|
is always passed on the stack. }
|
||||||
if (loc = LOC_REGISTER) and
|
if (loc = LOC_REGISTER) and
|
||||||
(nextintreg <= RS_X17) and
|
(nextintreg <= RS_X17) and
|
||||||
not forceintmem then begin
|
not forceintmem then
|
||||||
|
begin
|
||||||
paraloc^.loc := loc;
|
paraloc^.loc := loc;
|
||||||
|
|
||||||
{ make sure we don't lose whether or not the type is signed }
|
{ make sure we don't lose whether or not the type is signed }
|
||||||
@ -445,8 +451,10 @@ implementation
|
|||||||
paraloc^.register := newreg(R_INTREGISTER, nextintreg, R_SUBNONE);
|
paraloc^.register := newreg(R_INTREGISTER, nextintreg, R_SUBNONE);
|
||||||
inc(nextintreg);
|
inc(nextintreg);
|
||||||
dec(paralen, tcgsize2size[paraloc^.size]);
|
dec(paralen, tcgsize2size[paraloc^.size]);
|
||||||
end else if (loc = LOC_FPUREGISTER) and
|
end
|
||||||
(nextfloatreg <= RS_F17) then begin
|
else if (loc = LOC_FPUREGISTER) and
|
||||||
|
(nextfloatreg <= RS_F17) then
|
||||||
|
begin
|
||||||
paraloc^.loc := loc;
|
paraloc^.loc := loc;
|
||||||
paraloc^.size := paracgsize;
|
paraloc^.size := paracgsize;
|
||||||
paraloc^.def := locdef;
|
paraloc^.def := locdef;
|
||||||
@ -458,10 +466,12 @@ implementation
|
|||||||
otherwise, gcc doesn't do it either }
|
otherwise, gcc doesn't do it either }
|
||||||
inc(nextfloatreg);
|
inc(nextfloatreg);
|
||||||
dec(paralen, tcgsize2size[paraloc^.size]);
|
dec(paralen, tcgsize2size[paraloc^.size]);
|
||||||
end else if (loc = LOC_MMREGISTER) then begin
|
end
|
||||||
|
else if (loc = LOC_MMREGISTER) then
|
||||||
{ no mm registers }
|
{ no mm registers }
|
||||||
internalerror(2018072601);
|
internalerror(2018072601)
|
||||||
end else begin
|
else
|
||||||
|
begin
|
||||||
{ either LOC_REFERENCE, or one of the above which must be passed on the
|
{ either LOC_REFERENCE, or one of the above which must be passed on the
|
||||||
stack because of insufficient registers }
|
stack because of insufficient registers }
|
||||||
paraloc^.loc := LOC_REFERENCE;
|
paraloc^.loc := LOC_REFERENCE;
|
||||||
@ -487,7 +497,8 @@ implementation
|
|||||||
end;
|
end;
|
||||||
if (side = callerside) then
|
if (side = callerside) then
|
||||||
paraloc^.reference.index := NR_STACK_POINTER_REG
|
paraloc^.reference.index := NR_STACK_POINTER_REG
|
||||||
else begin
|
else
|
||||||
|
begin
|
||||||
{ during procedure entry, NR_OLD_STACK_POINTER_REG contains the old stack pointer }
|
{ during procedure entry, NR_OLD_STACK_POINTER_REG contains the old stack pointer }
|
||||||
paraloc^.reference.index := NR_FRAME_POINTER_REG;
|
paraloc^.reference.index := NR_FRAME_POINTER_REG;
|
||||||
{ create_paraloc_info_intern might be also called when being outside of
|
{ create_paraloc_info_intern might be also called when being outside of
|
||||||
|
Loading…
Reference in New Issue
Block a user