mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 10:26:06 +02:00
* fixed passing of constant longint parameters
git-svn-id: branches/i8086@23788 -
This commit is contained in:
parent
ec3d9ebc8a
commit
78cf362a90
@ -323,12 +323,34 @@ unit cgcpu;
|
|||||||
begin
|
begin
|
||||||
if use_push(cgpara) then
|
if use_push(cgpara) then
|
||||||
begin
|
begin
|
||||||
cgpara.check_simple_location;
|
if tcgsize2size[cgpara.Size] > 2 then
|
||||||
if tcgsize2size[cgpara.location^.size]>cgpara.alignment then
|
begin
|
||||||
pushsize:=cgpara.location^.size
|
if tcgsize2size[cgpara.Size] <> 4 then
|
||||||
|
internalerror(2013031101);
|
||||||
|
if tcgsize2size[cgpara.location^.size] <> 2 then
|
||||||
|
internalerror(2013031101);
|
||||||
|
if cgpara.location^.Next = nil then
|
||||||
|
internalerror(2013031101);
|
||||||
|
if tcgsize2size[cgpara.location^.Next^.size] <> 2 then
|
||||||
|
internalerror(2013031101);
|
||||||
|
if cgpara.location^.Next^.Next <> nil then
|
||||||
|
internalerror(2013031101);
|
||||||
|
Writeln(cgpara.alignment);
|
||||||
|
if cgpara.alignment <> 4 then
|
||||||
|
internalerror(2013031101);
|
||||||
|
|
||||||
|
list.concat(taicpu.op_const(A_PUSH,tcgsize2opsize[pushsize],a shr 16));
|
||||||
|
list.concat(taicpu.op_const(A_PUSH,tcgsize2opsize[pushsize],a and $FFFF));
|
||||||
|
end
|
||||||
else
|
else
|
||||||
pushsize:=int_cgsize(cgpara.alignment);
|
begin
|
||||||
list.concat(taicpu.op_const(A_PUSH,tcgsize2opsize[pushsize],a));
|
cgpara.check_simple_location;
|
||||||
|
if tcgsize2size[cgpara.location^.size]>cgpara.alignment then
|
||||||
|
pushsize:=cgpara.location^.size
|
||||||
|
else
|
||||||
|
pushsize:=int_cgsize(cgpara.alignment);
|
||||||
|
list.concat(taicpu.op_const(A_PUSH,tcgsize2opsize[pushsize],a));
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
inherited a_load_const_cgpara(list,size,a,cgpara);
|
inherited a_load_const_cgpara(list,size,a,cgpara);
|
||||||
|
Loading…
Reference in New Issue
Block a user