mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 16:49:07 +02:00
+ add support for passing 32-bit values in a pair of registers in
tcg8086.a_load_const_cgpara. This fixes passing const longint parameters in dx:ax when using the register calling convention on i8086. git-svn-id: trunk@38785 -
This commit is contained in:
parent
a73aabcc39
commit
bd3d35f2da
@ -1395,6 +1395,19 @@ unit cgcpu;
|
|||||||
push_const(list,pushsize,a);
|
push_const(list,pushsize,a);
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
else if (tcgsize2size[cgpara.Size]>2) and
|
||||||
|
(cgpara.location^.loc in [LOC_REGISTER,LOC_CREGISTER]) and
|
||||||
|
(cgpara.location^.Next<>nil) then
|
||||||
|
begin
|
||||||
|
if (tcgsize2size[cgpara.Size]<>4) or
|
||||||
|
(tcgsize2size[cgpara.location^.Size]<>2) or
|
||||||
|
not (cgpara.location^.Next^.Loc in [LOC_REGISTER,LOC_CREGISTER]) or
|
||||||
|
(tcgsize2size[cgpara.location^.Next^.Size]<>2) or
|
||||||
|
(cgpara.location^.Next^.Next<>nil) then
|
||||||
|
internalerror(2018041801);
|
||||||
|
a_load_const_reg(list,cgpara.location^.size,a and $FFFF,cgpara.location^.register);
|
||||||
|
a_load_const_reg(list,cgpara.location^.Next^.size,a shr 16,cgpara.location^.Next^.register);
|
||||||
|
end
|
||||||
else
|
else
|
||||||
inherited a_load_const_cgpara(list,size,a,cgpara);
|
inherited a_load_const_cgpara(list,size,a,cgpara);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user