mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 03:26:14 +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
|
||||
if use_push(cgpara) then
|
||||
begin
|
||||
cgpara.check_simple_location;
|
||||
if tcgsize2size[cgpara.location^.size]>cgpara.alignment then
|
||||
pushsize:=cgpara.location^.size
|
||||
if tcgsize2size[cgpara.Size] > 2 then
|
||||
begin
|
||||
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
|
||||
pushsize:=int_cgsize(cgpara.alignment);
|
||||
list.concat(taicpu.op_const(A_PUSH,tcgsize2opsize[pushsize],a));
|
||||
begin
|
||||
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
|
||||
else
|
||||
inherited a_load_const_cgpara(list,size,a,cgpara);
|
||||
|
Loading…
Reference in New Issue
Block a user